(editor: T, options: PluginOptions = {})
| 58 | } |
| 59 | |
| 60 | export const withPlugins = <T extends Editable>(editor: T, options: PluginOptions = {}) => { |
| 61 | let newEditor = withContextMenu(editor) |
| 62 | newEditor = withIndent(newEditor, options.indent) |
| 63 | newEditor = withMark(newEditor, options.mark) |
| 64 | newEditor = withFontSize(newEditor, options.fontSize) |
| 65 | newEditor = withFontColor(newEditor, options.fontColor) |
| 66 | newEditor = withBackgroundColor(newEditor, options.backgroundColor) |
| 67 | newEditor = withHeading(newEditor, options.heading) |
| 68 | newEditor = withBlockquote(newEditor, options.blockquote) |
| 69 | newEditor = withOrderedList(newEditor, options.orderedList) |
| 70 | newEditor = withUnorderedList(newEditor, options.unorderedList) |
| 71 | newEditor = withTaskList(newEditor, options.taskList) |
| 72 | newEditor = withTable(newEditor, options.table) |
| 73 | newEditor = withLink(newEditor, options.link) |
| 74 | newEditor = withImage(newEditor, options.image) |
| 75 | newEditor = withHr(newEditor, options.hr) |
| 76 | newEditor = withAlign(newEditor, options.align) |
| 77 | newEditor = withLeading(newEditor, options.leading) |
| 78 | newEditor = withMention(newEditor, options.mention) |
| 79 | newEditor = withCodeBlock(newEditor, options.codeBlock) |
| 80 | return newEditor as T & |
| 81 | ContextMenuEditor & |
| 82 | MarkEditor & |
| 83 | HeadingEditor & |
| 84 | FontSizeEditor & |
| 85 | BlockquoteEditor & |
| 86 | OrderedListEditor & |
| 87 | IndentEditor & |
| 88 | UnorderedListEditor & |
| 89 | TaskListEditor & |
| 90 | TableEditor & |
| 91 | LinkEditor & |
| 92 | ImageEditor & |
| 93 | HrEditor & |
| 94 | AlignEditor & |
| 95 | LeadingEditor & |
| 96 | FontColorEditor & |
| 97 | BackgroundColorEditor & |
| 98 | MentionEditor & |
| 99 | CodeBlockEditor |
| 100 | } |
| 101 | |
| 102 | export * from '@editablejs/plugin-mark' |
| 103 | export * from '@editablejs/plugin-font/size' |
no test coverage detected
searching dependent graphs…