mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-03 09:35:40 -05:00
Make "Double-click to edit" in empty md cell a bit nicer looking (#4102)
This commit is contained in:
committed by
Kevin Cunnane
parent
889d5e5b28
commit
1e915aad20
@@ -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) {
|
||||
(<HTMLElement>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<string>('notebook.showPreview', undefined, this._content).then((htmlcontent) => {
|
||||
let outputElement = <HTMLElement>this.output.nativeElement;
|
||||
outputElement.innerHTML = htmlcontent;
|
||||
});
|
||||
}
|
||||
// todo: pass in the notebook filename instead of undefined value
|
||||
this._commandService.executeCommand<string>('notebook.showPreview', undefined, this._content).then((htmlcontent) => {
|
||||
let outputElement = <HTMLElement>this.output.nativeElement;
|
||||
outputElement.innerHTML = htmlcontent;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user