Quill中文文档
  • 简介
  • 文档(Document)
    • 快速开始(QuickStart)
    • 下载(Download)
    • 配置项(Configuration)
    • 格式化(Formats)
    • API
      • content
      • formatting
      • selection
      • editor
      • events
      • model
      • extension
    • Delta
    • 模块(Modules)
      • 工具栏(Toolbar)
      • 键盘(Keyboard)
      • 历史(History)
      • 剪贴板(Clipboard)
      • 格式化(Formula)
      • 语法高亮(Syntax Highlighter)
    • 主题(Themes)
  • 指南(Guides)
    • 为什么要用Quill?(Why Quill)
    • 怎么自定义Quill
    • 将Quill添加到你的构建系统
    • 构建自定义模块
    • 通过Parchment克隆Medium
    • 设计Delta的格式
    • 与其他富文本编辑器对比
    • 升级到1.0
  • 其他相关库(Other)
    • Parchment
    • 自定义总结
  • 更新日志
Powered by GitBook
On this page
  1. 文档(Document)

快速开始(QuickStart)

最好的开发方法就是尝试一个简单的例子。Quill使用DOM元素初始化一个编辑器。这个元素的内容将成为Quill的初始化内容。

<!-- 引入样式文件 -->
<link href="https://cdn.quilljs.com/1.3.4/quill.snow.css" rel="stylesheet">

<!-- 创建一个编辑器容器 -->
<div id="editor">
  <p>Hello World!</p>
  <p>Some initial <strong>bold</strong> text</p>
  <p><br></p>
</div>

<!-- 引入Quill库文件 -->
<script src="https://cdn.quilljs.com/1.3.4/quill.js"></script>

<!-- 初始化Quill编辑器 -->
<script>
  var quill = new Quill('#editor', {
    theme: 'snow'
  });
</script>

这个就是一个简单例子的全部内容。

进一步了解

Previous文档(Document)Next下载(Download)

Last updated 5 years ago

Quill的真正魔力来自于它的灵活性和可扩展性。你能够查看网站上所有的演示或者直接进入来了解更多。要深入了解,请查看。

Interactive Playground
如何自定义Quill