@rtdui/editor
Version:
React rich text editor based on tiptap
25 lines (24 loc) • 789 B
TypeScript
import { Node } from "@tiptap/core";
export interface MathKatexBlockOptions {
exitOnTripleEnter: boolean;
exitOnArrowDown: boolean;
katexOptions: Record<string, any>;
HTMLAttributes: Record<string, any>;
}
declare module "@tiptap/core" {
interface Commands<ReturnType> {
mathKatexBlock: {
/**
* Set a katex block
*/
setMathBlock: (attributes?: Record<string, any>) => ReturnType;
/**
* Toggle a katex block
*/
toggleMathBlock: (attributes?: Record<string, any>) => ReturnType;
};
}
}
export declare const mathDollorBlockInputRegex: RegExp;
/** 处理在编辑器中的输入 */
export declare const MathKatexBlock: Node<MathKatexBlockOptions, any>;