mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -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() {
|
private updatePreview() {
|
||||||
if (this._content !== this.cellModel.source || this.cellModel.source.length === 0) {
|
if (this._content !== this.cellModel.source || this.cellModel.source.length === 0) {
|
||||||
if (!this.cellModel.source && !this.isEditMode) {
|
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 {
|
} else {
|
||||||
this._content = this.sanitizeContent(this.cellModel.source);
|
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