Function: codeBlockPlugin()

codeBlockPlugin(params?): RealmPlugin

A plugin that adds support for code blocks and custom code block editors.

Parameters

ParameterTypeDescription
params?object-
params.codeBlockEditorDescriptors?CodeBlockEditorDescriptor[]Pass an array of CodeBlockEditorDescriptor to register custom code block editors.
params.defaultCodeBlockLanguage?stringThe default code block language. Used when inserting a new code block, and as a fallback at import time for fences whose language has no matching descriptor.

Returns

RealmPlugin