如何在Wysiwyg中添加Quill中的“show html”按钮?

时间:2021-12-11 10:29:41

I recently found out about Quill text editor and since I am playing with new stuff in php and javascript I decided to use it in my app instead of Wysiwyg.

我最近发现了Quill文本编辑器,因为我正在使用php和javascript中的新东西,我决定在我的应用程序而不是Wysiwyg中使用它。

Quill documentation is really minimalistic though. How do I add a button that allows user to show and edit current html?

但是,Quill文档非常简约。如何添加允许用户显示和编辑当前html的按钮?

Do I have to extend Quill and make one of my own?

我是否必须延长Quill并制作我自己的一个?

1 个解决方案

#1


1  

If you check the following link, you will see that they don't add the option for an HTML button to the configuration list keys. Probably, you have to extend the library. http://quilljs.com/docs/configuration/ is the link to the configuration page.

如果您检查以下链接,您将看到他们没有将HTML按钮的选项添加到配置列表键。可能你必须扩展库。 http://quilljs.com/docs/configuration/是配置页面的链接。

In the API calls list I saw that you can do a function call to get HTML from the plugin. You can find it in the following link. The function name is called getHTML(). So you might have to extend the library by creating your own button and a display area.

在API调用列表中,我看到您可以执行函数调用以从插件中获取HTML。您可以在以下链接中找到它。函数名称称为getHTML()。因此,您可能需要通过创建自己的按钮和显示区域来扩展库。

#1


1  

If you check the following link, you will see that they don't add the option for an HTML button to the configuration list keys. Probably, you have to extend the library. http://quilljs.com/docs/configuration/ is the link to the configuration page.

如果您检查以下链接,您将看到他们没有将HTML按钮的选项添加到配置列表键。可能你必须扩展库。 http://quilljs.com/docs/configuration/是配置页面的链接。

In the API calls list I saw that you can do a function call to get HTML from the plugin. You can find it in the following link. The function name is called getHTML(). So you might have to extend the library by creating your own button and a display area.

在API调用列表中,我看到您可以执行函数调用以从插件中获取HTML。您可以在以下链接中找到它。函数名称称为getHTML()。因此,您可能需要通过创建自己的按钮和显示区域来扩展库。