gpt4 book ai didi

javascript - 鹅毛笔主题不起作用

转载 作者:行者123 更新时间:2023-12-01 16:18:21 24 4
gpt4 key购买 nike

我是一个快乐的业余爱好者,尝试建立自己的网站,并且认为我可以使用 Quill 作为文章和其他内容的不错的文本编辑器。当浏览开始的示例时,它根本不起作用。

<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.quilljs.com/1.1.9/quill.js"></script>
<link href="https://cdn.quilljs.com/1.1.9/quill.snow.css" rel="stylesheet">
<script src="https://cdn.quilljs.com/1.1.9/quill.core.js"></script>
<link href="https://cdn.quilljs.com/1.1.9/quill.core.css" rel="stylesheet">
</head>
<body>
<div id="editor">
<p>Hello World!</p>
<p>Some initial <strong>bold</strong> text</p>
<p><br></p>
</div>
<script>
var quill = new Quill('#editor', {
theme: 'snow'
});
</script>
</body>
</html>

它在控制台中给出以下错误消息:

quill Cannot import themes/snow. Are you sure it was registered?

Console Error message screenshot

我错过了什么?我应该在哪里以及如何注册?

快速编辑:
还应该说我尝试用 bubble 代替(当然还改变了头部的 CSS)。当我尝试使用模块时,每个模块也收到相同的错误消息。

最佳答案

您两次包含 Quill,第二次是没有主题的简化版本。只需包含主库:

<script src="https://cdn.quilljs.com/1.1.9/quill.js"></script>
<link href="https://cdn.quilljs.com/1.1.9/quill.snow.css" rel="stylesheet">

关于javascript - 鹅毛笔主题不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41539553/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com