- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当我们在 Wagtail 上使用 Hallo.js 时,我能够向编辑器添加一个按钮,以便您可以查看富文本字段的原始 HTML。
我的问题:这在 Draftail 中还有可能吗?
我已经浏览了文档 - 并成功地为 Draftail 编写了我自己的自定义函数,但它似乎只接受自定义按钮的 HTML 标签。
我看到 Draftail 将内容存储为 JSON 而不是 HTML,所以也许这限制了这个功能。
最佳答案
关于此主题有一个(已关闭)问题:https://github.com/springload/draftail/issues/156
Unfortunately there is no such thing possible in this editor, since it doesn’t store its content as HTML. Having such a feature would also go the opposite way to the editor’s general direction – trying to enforce that end users can't alter the content in unforeseen ways.
It would technically be possible to write a toolbar extension that takes the editor’s content, converts it to HTML, allows you to edit that, then inserts whatever was entered back into the editor – but again that completely defeats the purpose of using this editor to start with.
If you need such a feature, you'll probably be better off using an editor like https://www.tinymce.com/ or https://ckeditor.com/.
关于wagtail - 将 HTML 查看添加到 Wagtail 上的 Draftail 编辑器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50590958/
我正在尝试为 Wagtail 的 Draftail 文本编辑器(基于 draft.js)创建一个新实体。 我从这里的例子开始:http://docs.wagtail.io/en/v2.5.1/adva
我刚刚开始了解鹡鸰。如何为我的 Wagtail 配置所有内置的 draftail 格式。我需要添加 code 和 qoutes。 最佳答案 我认为如果您为此目的使用 StreamField 会更好,我
我正在尝试向 Wagtail 中的新编辑器添加上标。 我在这里看到文档:http://docs.wagtail.io/en/v2.0/advanced_topics/customisation/ext
当我们在 Wagtail 上使用 Hallo.js 时,我能够向编辑器添加一个按钮,以便您可以查看富文本字段的原始 HTML。 我的问题:这在 Draftail 中还有可能吗? 我已经浏览了文档 -
我将我的网站(开发版本)更新为 wagtail 2.0,并且我的页面的所有 RichTextField 属性都完全无法使用 Draftail.js 进行编辑。我在 settings.py 中添加了以下
我是一名优秀的程序员,十分优秀!