【发布时间】:2020-03-02 23:16:16
【问题描述】:
我遵循了 Quill 的文档,但是语法高亮不起作用。顺便说一句,即使Quill playground webpage 上的示例也不起作用,而Quill home page 上的示例正在运行。这是我的代码和 CodePen 的链接。
HTML
<div id="editor-container"><pre>for(int i=0;i<10;i++)
printf ("Hello");</pre>
</div>
JS
var quill = new Quill('#editor-container', {
modules: {
toolbar: [
[{ header: [1, 2, false] }],
['bold', 'italic', 'underline'],
['image', 'code-block']
]
},
placeholder: 'Compose an epic...',
theme: 'snow' // or 'bubble'
});
这是一个显示问题的 CodePen: https://codepen.io/imabot2/pen/mdJwdZy
【问题讨论】:
标签: javascript quill