如何添加“显示 html"?Quill 中的按钮就像 Wysiwyg 一样? [英] How do I add "show html" button in Quill like in Wysiwyg?

查看:44
本文介绍了如何添加“显示 html"?Quill 中的按钮就像 Wysiwyg 一样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

我是否必须扩展 Quill 并制作自己的 Quill?

解决方案

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

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

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 documentation is really minimalistic though. How do I add a button that allows user to show and edit current html?

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

解决方案

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.

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.

这篇关于如何添加“显示 html"?Quill 中的按钮就像 Wysiwyg 一样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆