From 1e915aad2039c06914ca907d23b65bf1fefd29b1 Mon Sep 17 00:00:00 2001 From: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com> Date: Fri, 22 Feb 2019 14:00:35 -1000 Subject: [PATCH] Make "Double-click to edit" in empty md cell a bit nicer looking (#4102) --- .../parts/notebook/cellViews/textCell.component.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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; + }); } }