简体   繁体   English

如何使用vue-quill包关注Quill编辑器?

[英]How to focus Quill editor using the vue-quill package?

I am using the vue-quill-editor package for my vue application, but I can only focus on the editor if I click on the same line as the editor. 我正在为我的vue应用程序使用vue-quill-editor包,但是如果我点击与编辑器相同的行,我只能专注于编辑器。 I would like to be able to focus on the Editor by clicking anywhere within the parent 我希望能够通过单击父级中的任何位置来专注于编辑器

I know there is a quill.focus() function, but is there a way that I can access it without changing the vue-quill-editor file? 我知道有一个quill.focus()函数,但有没有办法可以在不更改vue-quill-editor文件的情况下访问它? If I do change it, are there things that I should be aware of when working with others? 如果我确实改变了它,那么在与他人合作时我应该注意哪些事项?

https://imgur.com/a/mhKPVo0 here I have uploaded a photo that may better explain my struggle. https://imgur.com/a/mhKPVo0在这里我上传了一张可以更好地解释我的斗争的照片。

Any suggestions on what I should try? 关于我应该尝试什么的任何建议?

听父母点击然后找到主轴编辑器(通过id或任何选择器)然后是element.focus()BTW,元素必须是一个输入元素。

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

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