Interface: CodeBlockEditorDescriptor
Implement this interface to create a custom code block editor. Pass the object in the codeBlockPlugin parameters.
Properties
| Property | Type | Description |
|---|---|---|
Editor | ComponentType<CodeBlockEditorProps> | The React component to be used. See CodeBlockEditorProps for the props passed to the component. |
match | (language: undefined | null | string, meta: undefined | null | string) => boolean | A function that returns true if the descriptor's editor should be used for the given code block. |
priority | number | The priority of the descriptor when descriptors are matched against a given code block. Lower number means lower priority. This allows you to implement a catch-all generic editor and a more specific editor for a given language / meta. |