Notebooks: Hide link and image buttons in text cell toolbar in WYSIWYG mode (#12240)

* hide link and image buttons in WYSIWYG mode

* defined taskbar actions

* rename arrays
This commit is contained in:
Lucy Zhang
2020-09-11 15:55:06 -07:00
committed by GitHub
parent 3d81da9762
commit f99adf3de4
2 changed files with 39 additions and 3 deletions

View File

@@ -541,6 +541,12 @@ export class ToggleViewAction extends Action {
this.class += ' active';
context.cellModel.showPreview = this.showPreview;
context.cellModel.showMarkdown = this.showMarkdown;
// Hide link and image buttons in WYSIWYG mode
if (this.showPreview && !this.showMarkdown) {
context.hideLinkAndImageButtons();
} else {
context.showLinkAndImageButtons();
}
return true;
}
}