@aomao/plugin-codeblock-vue
Version:
18 lines (17 loc) • 857 B
TypeScript
import { Plugin, NodeInterface, SchemaInterface } from '@aomao/engine';
import type MarkdownIt from 'markdown-it';
import CodeBlockComponent, { CodeBlockValue } from './component';
import { CodeBlockOptions } from './types';
export default class<T extends CodeBlockOptions = CodeBlockOptions> extends Plugin<T> {
static get pluginName(): string;
init(): void;
execute(mode: string, value: string): void;
hotkey(): string | string[];
markdownIt: (mardown: MarkdownIt) => void;
pasteSchema: (schema: SchemaInterface) => void;
pasteHtml: (node: NodeInterface) => boolean | undefined;
parseHtml: (root: NodeInterface, callback?: ((node: NodeInterface, value: CodeBlockValue) => NodeInterface) | undefined) => NodeInterface[];
destroy(): void;
}
export { CodeBlockComponent };
export type { CodeBlockValue };