diff --git a/src/sql/parts/notebook/cellViews/textCell.component.ts b/src/sql/parts/notebook/cellViews/textCell.component.ts index 5b31b92390..783bf0e338 100644 --- a/src/sql/parts/notebook/cellViews/textCell.component.ts +++ b/src/sql/parts/notebook/cellViews/textCell.component.ts @@ -129,15 +129,15 @@ export class TextCellComponent extends CellView implements OnInit, OnChanges { private updatePreview() { if (this._content !== this.cellModel.source || this.cellModel.source.length === 0) { if (!this.cellModel.source && !this.isEditMode) { - (this.output.nativeElement).innerHTML = localize('doubleClickEdit', 'Double-click to edit'); + this._content = localize('doubleClickEdit', 'Double-click to edit'); } else { this._content = this.sanitizeContent(this.cellModel.source); - // todo: pass in the notebook filename instead of undefined value - this._commandService.executeCommand('notebook.showPreview', undefined, this._content).then((htmlcontent) => { - let outputElement = this.output.nativeElement; - outputElement.innerHTML = htmlcontent; - }); } + // todo: pass in the notebook filename instead of undefined value + this._commandService.executeCommand('notebook.showPreview', undefined, this._content).then((htmlcontent) => { + let outputElement = this.output.nativeElement; + outputElement.innerHTML = htmlcontent; + }); } }