fix delete behavior on text cells. (#13153)

* remove default <p> text and add css instead

* remove the top/bottom padding on preview markdown
This commit is contained in:
Maddy
2020-11-05 14:19:11 -08:00
committed by GitHub
parent 27fbad5884
commit 6c37ac56b7
2 changed files with 6 additions and 2 deletions

View File

@@ -225,7 +225,7 @@ export class TextCellComponent extends CellView implements OnInit, OnChanges {
this._content = localize('addContent', "<i>Add content here...</i>");
}
} else {
this._content = this.cellModel.source[0] === '' ? '<p>&nbsp;</p>' : this.cellModel.source;
this._content = this.cellModel.source;
}
this.markdownRenderer.setNotebookURI(this.cellModel.notebookModel.notebookUri);
this.markdownResult = this.markdownRenderer.render({

View File

@@ -17,6 +17,8 @@ text-cell-component .notebook-preview {
flex-direction: column;
padding-left: 8px;
padding-right: 8px;
padding-top: 14px;
padding-bottom: 14px;
user-select: none;
width: 100%;
outline: none;
@@ -29,7 +31,9 @@ text-cell-component .show-markdown .notebook-preview {
border-left-width: 1px;
border-style: solid;
border-top-width: 0;
width: 50%
width: 50%;
padding-top: 0px;
padding-bottom: 0px;
}
.notebook-preview.actionselect {
user-select: text;