Interface: CodeBlockEditorDescriptor

Implement this interface to create a custom code block editor. Pass the object in the codeBlockPlugin parameters.

Properties

PropertyTypeDescription
EditorComponentType<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) => booleanA function that returns true if the descriptor's editor should be used for the given code block.
prioritynumberThe 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.