@iimm/ckeditor5-first-line-indent
v1.1.0
Published
Add firstLineIndent feature ,a plugin for CKEditor 5.
Downloads
124
Maintainers
Readme
@iimm/ckeditor5-first-line-indent
=================================
This package was created by the ckeditor5-package-generator package.
This is a ckeditor5 plugin that adds the first line indent feature.
这是一个Ckeditor5插件,添加了首行缩进功能。
Install
npm install @iimm/ckeditor5-first-line-indent
Usage
import { DecoupledEditor } from "ckeditor5";
import { CKEditor } from "@ckeditor/ckeditor5-react";
import { FirstLineIndent } from '@iimm/ckeditor5-first-line-indent';
import translations from "ckeditor5/translations/zh-cn.js";
import firstLineIndentTranslations from "@iimm/ckeditor5-first-line-indent/translations/zh-cn.js";
import "ckeditor5/ckeditor5.css";
const Exmaple = () => {
return (
<>
{/* other elements */}
<CKEditor
editor = {DecoupledEditor}
config = {{
toolbar: {items:["firstLineIndent"]},
plugins: [FirstLineIndent],
language: "zh-cn",
translations: [translations, firstLineIndentTranslations],
firstLineIndent: {
/**
* @default 2em
*/
value: "2em",
/**
* elements to exclude
* @default [ 'image', 'media', 'table' ]
*/
exclude: [ 'image', 'media', 'table' ]
},
}}
/>
</>
);
}