quill-text-indent
v1.0.2
Published
✨ A simple tool for first line indentation in Quill editor.
Downloads
14
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;
}