You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
Desktop,Mobile: Plugins: Simplify getting the ID of the note open in an editor (#11841)
This commit is contained in:
@@ -622,6 +622,27 @@ export interface CodeMirrorControl {
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
enableLanguageDataAutocomplete: { of: (enabled: boolean)=> any };
|
||||
|
||||
/**
|
||||
* A CodeMirror [facet](https://codemirror.net/docs/ref/#state.EditorState.facet) that contains
|
||||
* the ID of the note currently open in the editor.
|
||||
*
|
||||
* Access the value of this facet using
|
||||
* ```ts
|
||||
* const noteIdFacet = editorControl.joplinExtensions.noteIdFacet;
|
||||
* const editorState = editorControl.editor.state;
|
||||
* const noteId = editorState.facet(noteIdFacet);
|
||||
* ```
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- No better type available
|
||||
noteIdFacet: any;
|
||||
/**
|
||||
* A CodeMirror [StateEffect](https://codemirror.net/docs/ref/#state.StateEffect) that is
|
||||
* included in a [Transaction](https://codemirror.net/docs/ref/#state.Transaction) when the
|
||||
* note ID changes.
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- No better type available
|
||||
setNoteIdEffect: any;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user