CodeMirrorModule.defineOption method
CodeMirrorModule › defineOption
Unofficial
Registers a new editor option.Signature:
defineOption(name: string, defaultValue: unknown, onUpdate: (editor: Cm5Editor, val: unknown, old: unknown) => void): voidParameters:
| Parameter | Type | Description |
|---|---|---|
| name | string | The option name. |
| defaultValue | unknown | The default value for the option. |
| onUpdate | (editor: Cm5Editor, val: unknown, old: unknown) => void | The update handler. |
Returns: void