import { SDKPluginOptions } from '../utils'; export interface RteProseMirrorOptionsSchema extends SDKPluginOptions { /** * Enable the RTE on click of the text component, instead of the default double-click. * @default false */ enableOnClick?: boolean; /** * Disable the RTE on pressing the Escape key. * @default false */ disableOnEsc?: boolean; /** * Extend the default ProseMirror schema. * @examples * ({ schema }) => { * // add additional nodes and return a new schema * return new Schema({ * nodes: schema.spec.nodes.append({...}), * marks: schema.spec.marks * }); * } */ schema?: '__fn__'; /** * Pass additional ProseMirror plugins. * @examples * ({ plugins }) => [ * // use the default plugins * ...plugins, * // pass your plugins * ] */ plugins?: '__fn__'; /** * Customize the toolbar items. * @examples * toolbar({ items, component, proseMirror }) { * const { view } = proseMirror; * return [ * // use the default toolbar items * ...items, * { * id: 'customButton', * type: 'button', * icon: 'flare', * onClick: () => {...} * } * ]; * } */ toolbar?: '__fn__'; /** * Custom function to handle the Enter key press. * @examples * onEnter({ commands, component }) { * if (component.is('link')) { * // Create always a break for links * commands.text.createBreak(); * return true; * } * } */ onEnter?: '__fn__'; }