主题
主题让你能够轻松地以最少的精力使编辑器看起来更美观。Quill 提供两个官方支持的主题:雪花 和 气泡。
¥Themes allow you to easily make your editor look good with minimal effort. Quill features two officially supported themes: Snow and Bubble.
用法
¥Usage
<!-- Add the theme's stylesheet --><link rel="stylesheet" href="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/quill/2.0.0-dev.4/quill.bubble.css" />
<script src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/quill/2.0.0-dev.4/quill.js"></script><script> const quill = new Quill('#editor', { theme: 'bubble', // Specify theme in configuration });</script>
气泡
¥Bubble
Bubble 是一个简单的基于工具提示的主题。
¥Bubble is a simple tooltip based theme.
独立
¥Standalone
雪花
¥Snow
Snow 是一款简洁、扁平化的工具栏主题。
¥Snow is a clean, flat toolbar theme.
独立
¥Standalone
自定义
¥Customization
主题主要通过其 CSS 样式表控制 Quill 的视觉外观,并且可以通过覆盖这些规则轻松地进行许多更改。与其他 Web 应用一样,最简单的方法是使用浏览器开发者控制台检查元素,查看影响它们的规则。
¥Themes primarily control the visual look of Quill through its CSS stylesheet, and many changes can easily be made by overriding these rules. This is easiest to do, as with any other web application, by simply using your browser developer console to inspect the elements to view the rules affecting them.
许多其他自定义操作可以通过相应的模块完成。例如,工具栏可能是最显眼的用户界面,但大部分自定义操作都是通过 工具栏模块 完成的。
¥Many other customizations can be done through the respective modules. For example, the toolbar is perhaps the most visible user interface, but much of the customization is done through the Toolbar module.