@edtr-io/plugin-text
Version:
23 lines • 1.35 kB
TypeScript
import * as React from 'react';
import { Editor } from 'slate';
import { NodeRendererProps, NodeEditorProps, TextPlugin, NodeControlsProps } from '../..';
export declare const katexBlockNode = "@splish-me/katex-block";
export declare const katexInlineNode = "@splish-me/katex-inline";
export declare const isKatex: (editor: Editor) => boolean;
export declare const insertKatex: (editor: Editor) => Editor;
export declare const removeKatex: (editor: Editor) => Editor;
export interface KatexPluginOptions {
EditorComponent?: React.ComponentType<NodeEditorProps & {
name: string;
}>;
RenderComponent?: React.ComponentType<NodeRendererProps>;
ControlsComponent?: React.ComponentType<NodeControlsProps>;
}
export declare const createKatexPlugin: ({ EditorComponent, RenderComponent }?: KatexPluginOptions) => (pluginClosure: React.RefObject<{
overlayContext: import("@edtr-io/editor-ui").OverlayContextValue;
name: string;
parent?: import("../../factory/editor").SlateEditorAdditionalProps | undefined;
replace?: ((options?: import("@edtr-io/core").DocumentState | undefined) => void) | undefined;
plugins: Record<string, import("@edtr-io/core").Plugin<import("@edtr-io/core/dist/plugin-state").StateDescriptor<any, any, unknown>, any>>;
}>) => TextPlugin;
//# sourceMappingURL=index.d.ts.map