Function: maxLengthPlugin()

maxLengthPlugin(params?): RealmPlugin

A plugin that limits the maximum length of the text content of the editor. Adapted from the Lexical plugin. https://github.com/facebook/lexical/blob/main/packages/lexical-playground/src/plugins/MaxLengthPlugin/index.tsx

Parameters

ParameterType
params?number

Returns

RealmPlugin

Example

   <MDXEditor plugins={[maxLengthPlugin(100)]} markdown={'hello world'} />