Documentation / jpl-vite / api / CodeMirrorControl
Interface: CodeMirrorControl
Properties
cm6
cm6:
any
Defined in
joplin-plugin-api/dist/types.d.ts:414
editor
editor:
any
Points to a CodeMirror 6 EditorView instance.
Defined in
joplin-plugin-api/dist/types.d.ts:413
joplinExtensions
joplinExtensions:
object
enableLanguageDataAutocomplete
enableLanguageDataAutocomplete:
object
Creates an extension that enables or disables languageData
-based autocompletion.
enableLanguageDataAutocomplete.of()
enableLanguageDataAutocomplete.of: (
enabled
) =>any
Parameters
• enabled: boolean
Returns
any
completionSource()
Returns a CodeMirror 6 extension that registers the given CompletionSource.
Use this extension rather than the built-in CodeMirror autocompletion
if you don't want to use languageData-based autocompletion.
Using autocompletion({ override: [ ... ]})
causes errors when done by multiple plugins.
Parameters
• completionSource: any
Returns
any
Defined in
joplin-plugin-api/dist/types.d.ts:420
Methods
addExtension()
addExtension(
extension
):void
extension
should be a CodeMirror 6 extension.
Parameters
• extension: any
Returns
void
Defined in
joplin-plugin-api/dist/types.d.ts:416
execCommand()
execCommand(
name
, ...args
):any
Parameters
• name: string
• ...args: any
[]
Returns
any
Defined in
joplin-plugin-api/dist/types.d.ts:418
registerCommand()
registerCommand(
name
,callback
):void
Parameters
• name: string
• callback: EditorCommandCallback
Returns
void
Defined in
joplin-plugin-api/dist/types.d.ts:419
supportsCommand()
supportsCommand(
name
):boolean
Parameters
• name: string
Returns
boolean
Defined in
joplin-plugin-api/dist/types.d.ts:417