* Hides the editor and shows any textarea/div that the editor is supposed to replace. * * @method hide
()
| 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. |
no test coverage detected