MCPcopy
hub / github.com/tinymce/tinymce / hide

Method hide

modules/tinymce/src/core/main/ts/api/Editor.ts:682–704  ·  view source on GitHub ↗

* Hides the editor and shows any textarea/div that the editor is supposed to replace. * * @method hide

()

Source from the content-addressed store, hash-verified

680 * @method hide
681 */
682 public hide(): void {
683 const self = this;
684
685 if (!self.hidden) {
686 // We must save before we hide so Safari doesn't crash
687 self.save();
688
689 if (self.inline) {
690 self.getBody().contentEditable = 'false';
691
692 // Make sure the editor gets blurred
693 if (self === self.editorManager.focusedEditor) {
694 self.editorManager.focusedEditor = null;
695 }
696 } else {
697 DOM.hide(self.getContainer());
698 DOM.setStyle(self.id, 'display', self.orgDisplay);
699 }
700
701 self.hidden = true;
702 self.dispatch('hide');
703 }
704 }
705
706 /**
707 * Returns true/false if the editor is hidden or not.

Callers 15

EditorTest.tsFile · 0.80
DomUtilsTest.tsFile · 0.80
FakeCaretTest.tsFile · 0.80
onActionFunction · 0.80
registerEventsFunction · 0.80
hideFakeCaretFunction · 0.80
execCommandFunction · 0.80
showMethod · 0.80
registerUiFunction · 0.80
ShowHideTest.tsFile · 0.80

Calls 4

saveMethod · 0.80
getBodyMethod · 0.80
getContainerMethod · 0.80
dispatchMethod · 0.65

Tested by

no test coverage detected