Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

quill-text-indent

harmless75337MIT1.0.2

✨ A simple tool for first line indentation in Quill editor.

quill, text-indent

readme

quill-text-indent

✨ A simple tool for first line indentation in Quill editor.

一个简单 Quill 的首行缩进工具。

Install

NPM

npm install quill-text-indent

Usage

Webpack/ES6

import QuillTextIndent, { QuillTextIndentStyle } from "quill-text-indent";

Quill.register("modules/text-indent", QuillTextIndent);
Quill.register("formats/text-indent", QuillTextIndentStyle);

const toolbarOptions = {
  container: [
    // ...other toolbar item
    ["text-indent"],
  ],
  handlers: { "text-indent": function() {} }
}

const quill = new Quill("#editor", {
    modules: {
        toolbar: toolbarOptions,
        "text-indent": true,
    },
});

Style

// Use when the SVG button has no color.
// 当工具栏 svg 按钮没有选中状态颜色时使用
.ql-first-line-indent.ql-active path {
  fill: #06c;
}