@toast-ui/editor-plugin-code-syntax-highlight
Version:
TOAST UI Editor : Code Syntax Highlight Plugin
22 lines (17 loc) • 393 B
TypeScript
import type { PluginContext, PluginInfo } from '@toast-ui/editor';
import Prism from 'prismjs';
type PrismJs = typeof Prism & {
manual: boolean;
};
declare global {
interface Window {
Prism: PrismJs;
}
}
export type PluginOptions = {
highlighter?: PrismJs;
};
export default function codeSyntaxHighlightPlugin(
context: PluginContext,
options: PluginOptions
): PluginInfo;