Options
All
  • Public
  • Public/Protected
  • All
Menu

CodeMirrorControl

Index

Properties

cm6

cm6: any

editor

editor: any

Points to a CodeMirror 6 EditorView instance.

joplinExtensions

joplinExtensions: { enableLanguageDataAutocomplete: { of: (enabled: boolean) => any }; noteIdFacet: any; setNoteIdEffect: any; completionSource: any }

Type declaration

  • enableLanguageDataAutocomplete: { of: (enabled: boolean) => any }

    Creates an extension that enables or disables languageData-based autocompletion.

    • of: (enabled: boolean) => any
        • (enabled: boolean): any
        • Parameters

          • enabled: boolean
  • noteIdFacet: any

    A CodeMirror facet that contains the ID of the note currently open in the editor.

    Access the value of this facet using

    const noteIdFacet = editorControl.joplinExtensions.noteIdFacet;
    const editorState = editorControl.editor.state;
    const noteId = editorState.facet(noteIdFacet);
  • setNoteIdEffect: any

    A CodeMirror StateEffect that is included in a Transaction when the note ID changes.

  • completionSource: function
    • completionSource(completionSource: any): any

Methods

addExtension

  • addExtension(extension: any | any[]): void

execCommand

  • execCommand(name: string, ...args: any[]): any
  • Parameters

    • name: string
    • Rest ...args: any[]

registerCommand

supportsCommand

  • supportsCommand(name: string): boolean
  • Parameters

    • name: string