Home > Mobile >  Tinymce, Vuetify dialog, can't write in source code editor or insert code sample
Tinymce, Vuetify dialog, can't write in source code editor or insert code sample

Time:11-20

I have a problem with vuetify dialog and tinymce editor. When I open the dialog with the editor in it, the editor does not work as intended, especially the plugins like Edit source code or Insert code sample. When I open one of them (one of the plugins) I can't focus on the textarea created by the plugin it focuses every time on the input from the dialog

I attached here (codesandbox) the working example code. Full description is on their Github issue page.

Any ideas how to fix the problem?

Thank you

CodePudding user response:

The problem here is that Vuetify (and many other modal dialog implementations) will trap the focus within the dialog and prevent it moving to any other popups, such as those used by TinyMCE. To disable this you'll need to add the retain-focus prop as noted in the documentation: https://vuetifyjs.com/en/api/v-dialog/#props

Here's a working codesandbox: https://codesandbox.io/embed/tinymce-vue-forked-ec670?file=/src/App.vue

  • Related