简体   繁体   English

如何让 Quill 链接编辑器出现在 Quill 工具栏的顶部?

[英]How do I get the Quill link editor to appear on TOP of the Quill toolbar?

I use Quill.js for dynamically created text editors.我将 Quill.js 用于动态创建的文本编辑器。

I'm using bounds to keep the link editor inside my DIV left/right, but if the user creates a link in the first row of the Quill editor the link editor is hidden behind the Quill toolbar.我使用边界将链接编辑器保留在我的 DIV 左/右内,但如果用户在 Quill 编辑器的第一行中创建链接,则链接编辑器隐藏在 Quill 工具栏后面。

If I create a few carriage returns, then add the link, the link editor is visible.如果我创建几个回车,然后添加链接,链接编辑器是可见的。

In Quill demos these editors appear on TOP of the editor...how can I make this happen?在 Quill 演示中,这些编辑器出现在编辑器的顶部......我怎样才能做到这一点? Or some other solution so the crucial link editor is visible?或者其他一些解决方案,以便关键链接编辑器可见?

Here's a snippet:这是一个片段:

quillP = new Quill('#comment-editor' + comment.comment_id, {
           modules: {
             toolbar: quillTB
           },
             theme: 'snow',
             bounds: '#comment-editor' + comment.comment_id
           }); 

Quill Link 编辑器仅可见 - 位于工具栏后面 如果我添加一些回车然后添加链接,链接编辑器可见

We had a similar issue and fixed it by changing the z-index.我们遇到了类似的问题,并通过更改 z-index 来修复它。

In our case we overloaded the quill.snow.css and modded the corresponding block.在我们的例子中,我们重载了 quill.snow.css 并修改了相应的块。

.ql-snow .ql-tooltip {
    ...
    z-index: 2;
}

Hope that'll help you.希望能帮到你。 ;-) ;-)

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

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