UNPKG

@nish1896/rhf-mui-components

Version:

A suite of 20+ production-ready react-hook-form components built with material-ui. Fully typed, tree-shakable, and optimized for enterprise-grade forms.

106 lines (105 loc) 1.94 kB
import { Alignment, BlockQuote, Bold, CodeBlock, Essentials, Font, Heading, Italic, Link, List, Strikethrough, Table, TableToolbar, Underline, Undo } from "ckeditor5"; //#region src/misc/rich-text-editor/config.ts /** * Default Editor Config for CkEditor in the RHFRichTextEditor component. * * To view the list of complete features, refer * https://ckeditor.com/docs/ckeditor5/latest/features/index.html * * For an advanced feature usage example, refer * https://github.com/nishkohli96/react-libs/blob/main/src/pages/rte/CkEditorAdvanced.tsx */ const DefaultEditorConfig = { plugins: [ Essentials, Font, Undo, Bold, Italic, Underline, Strikethrough, Heading, Link, List, BlockQuote, CodeBlock, Table, TableToolbar, Alignment ], toolbar: { items: [ "undo", "redo", "|", "heading", "alignment", "blockQuote", "|", "bold", "italic", "underline", "strikethrough", "|", "fontSize", "fontFamily", "fontColor", "fontBackgroundColor", "|", "bulletedList", "numberedList", "|", "link", "codeBlock", "insertTable" ] }, heading: { options: [ { model: "paragraph", title: "Paragraph", class: "ck-heading_paragraph" }, { model: "heading1", view: "h1", title: "Heading 1", class: "ck-heading_heading1" }, { model: "heading2", view: "h2", title: "Heading 2", class: "ck-heading_heading2" }, { model: "heading3", view: "h3", title: "Heading 3", class: "ck-heading_heading3" }, { model: "heading4", view: "h4", title: "Heading 4", class: "ck-heading_heading4" }, { model: "heading5", view: "h5", title: "Heading 5", class: "ck-heading_heading5" }, { model: "heading6", view: "h6", title: "Heading 6", class: "ck-heading_heading6" } ] }, table: { contentToolbar: [ "tableColumn", "tableRow", "mergeTableCells" ] } }; //#endregion export { DefaultEditorConfig };