快速入门
入门的最佳方法是尝试一个简单的示例。Quill 使用一个 DOM 元素初始化以包含编辑器。该元素的内容将成为 Quill 的初始内容。
¥The best way to get started is to try a simple example. Quill is initialized with a DOM element to contain the editor. The contents of that element will become the initial contents of Quill.
<!-- Include stylesheet --> <link href="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/quill/2.0.0-dev.4/quill.snow.css" rel="stylesheet" /> <!-- Create the editor container --> <div id="editor"> <p>Hello World!</p> <p>Some initial <strong>bold</strong> text</p> <p><br /></p> </div> <!-- Include the Quill library --> <script src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/quill/2.0.0-dev.4/quill.js"></script> <!-- Initialize Quill editor --> <script> const quill = new Quill('#editor', { theme: 'snow' }); </script>
就是这样!
¥And that's all there is to it!
后续步骤
¥Next Steps
Quill 真正的魔力在于它的灵活性和可扩展性。你可以通过试用本网站的演示或直接访问 互动在线运行 来了解其可能性。有关深入的演示,请查看 如何自定义 Quill。
¥The real magic of Quill comes in its flexibility and extensibility. You can get an idea of what is possible by playing around with the demos throughout this site or head straight to the Interactive Playground. For an in-depth walkthrough, take a look at How to Customize Quill.