简体   繁体   English

Tinymce,Vuetify 对话框,无法在源代码编辑器中编写或插入代码示例

[英]Tinymce, Vuetify dialog, can't write in source code editor or insert code sample

I have a problem with vuetify dialog and tinymce editor.我对 vuetify 对话框和 tinymce 编辑器有疑问。 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.在此处(codesandbox)附上了工作示例代码。 Full description is on their Github issue page .完整的描述在他们的Github 问题页面上

Any ideas how to fix the problem?任何想法如何解决这个问题?

Thank you谢谢

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.这里的问题是 Vuetify(和许多其他模态对话框实现)会将焦点捕获在对话框中并阻止它移动到任何其他弹出窗口,例如 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要禁用此功能,您需要添加文档中所述的retain-focus道具: 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这是一个工作代码框: https://codesandbox.io/embed/tinymce-vue-forked-ec670?file=/src/App.vue

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM