tinymce / tinymce-vue

Official TinyMCE Vue component
MIT License
2.01k stars 202 forks source link

When used in vue <keep-alive>,how to not destroy the editor in deactivated hook #340

Closed JackieCheung closed 1 year ago

JackieCheung commented 1 year ago

What is the current behavior? When used in vue <keep-alive>,the editor will be removed in deactivated hook:

onDeactivated(() => {
  if (!modelBind) {
    cache = vueEditor.getContent();
  }
  getTinymce()?.remove(vueEditor);
});

What is the expected behavior?

How to prevent to remove the editor automatically?

exalate-issue-sync[bot] commented 1 year ago

Ref: INT-3020

jscasca commented 1 year ago

The editor gets removed otherwise it might become unusable if Vue moves it around. What seems to be the issue?