UNPKG

@rtdui/editor

Version:

React rich text editor based on tiptap

29 lines (26 loc) 611 B
'use client'; import { Extension } from '@tiptap/core'; import { KatexInlinePlugin } from './math-katex-inline-plugin.mjs'; const MathKatexInline = Extension.create({ name: "mathKatex", // Node type // 扩展配置 addOptions() { return { katexOptions: {} }; }, // ProseMirror插件 addProseMirrorPlugins() { return [ ...this.parent?.() || [], KatexInlinePlugin({ editor: this.editor, name: this.name, katexOptions: this.options.katexOptions }) ]; } }); export { MathKatexInline }; //# sourceMappingURL=math-katex-inline.mjs.map