diff --git a/src/sql/parts/notebook/cellViews/textCell.component.html b/src/sql/parts/notebook/cellViews/textCell.component.html index d9457a4f4a..05b735c123 100644 --- a/src/sql/parts/notebook/cellViews/textCell.component.html +++ b/src/sql/parts/notebook/cellViews/textCell.component.html @@ -9,6 +9,6 @@ -
+
diff --git a/src/sql/parts/notebook/cellViews/textCell.component.ts b/src/sql/parts/notebook/cellViews/textCell.component.ts index a8fa274db4..6bb57c3468 100644 --- a/src/sql/parts/notebook/cellViews/textCell.component.ts +++ b/src/sql/parts/notebook/cellViews/textCell.component.ts @@ -38,7 +38,6 @@ export class TextCellComponent extends CellView implements OnInit, OnChanges { private _content: string; private isEditMode: boolean; private _sanitizer: ISanitizer; - private _previewCssApplied: boolean = false; private _model: NotebookModel; private _activeCellId: string; @@ -127,29 +126,13 @@ export class TextCellComponent extends CellView implements OnInit, OnChanges { } public handleContentChanged(): void { - if (!this._previewCssApplied) { - this.updatePreviewCssClass(); - } this.updatePreview(); } public toggleEditMode(editMode?: boolean): void { this.isEditMode = editMode !== undefined? editMode : !this.isEditMode; - this.updatePreviewCssClass(); + this.updatePreview(); this._changeRef.detectChanges(); } - - // Updates the css class to preview 'div' based on edit mode - private updatePreviewCssClass() { - let outputElement = this.output.nativeElement; - if (this.isEditMode && this.cellModel.source) { - outputElement.className = 'notebook-preview'; - this._previewCssApplied = true; - } - else { - outputElement.className = ''; - this._previewCssApplied = false; - } - } } diff --git a/src/sql/parts/notebook/cellViews/textCell.css b/src/sql/parts/notebook/cellViews/textCell.css index df8a1dca3e..bb2b57b980 100644 --- a/src/sql/parts/notebook/cellViews/textCell.css +++ b/src/sql/parts/notebook/cellViews/textCell.css @@ -11,4 +11,6 @@ text-cell-component .notebook-preview { border-top-width: 1px; border-top-style: solid; user-select: initial; + padding-left: 8px; + padding-right: 8px; } \ No newline at end of file