From 49f1e5e6dc41f004b8702ce3c8422affa8ee6ee9 Mon Sep 17 00:00:00 2001 From: Pan Date: Tue, 4 Dec 2018 18:15:52 +0800 Subject: [PATCH] fix[Tinymce]: fixed fullScreen bug #1400 --- src/components/Tinymce/index.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/Tinymce/index.vue b/src/components/Tinymce/index.vue index 7f4a0ae0..9032a6a8 100644 --- a/src/components/Tinymce/index.vue +++ b/src/components/Tinymce/index.vue @@ -157,8 +157,13 @@ export default { }) }, destroyTinymce() { - if (window.tinymce.get(this.tinymceId)) { - window.tinymce.get(this.tinymceId).destroy() + const tinymce = window.tinymce.get(this.tinymceId) + if (this.fullscreen) { + tinymce.execCommand('mceFullScreen') + } + + if (tinymce) { + tinymce.destroy() } }, setContent(value) {