You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
Chore: Plugin API: Rename CodeMirrorContentScriptModule
to MarkdownEditorContentScriptModule
(#10015)
This commit is contained in:
@ -566,8 +566,8 @@ export interface CodeMirrorControl {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CodeMirrorContentScriptModule extends Omit<ContentScriptModule, 'plugin'> {
|
export interface MarkdownEditorContentScriptModule extends Omit<ContentScriptModule, 'plugin'> {
|
||||||
plugin: (codeMirrorControl: CodeMirrorControl)=> void;
|
plugin: (editorControl: CodeMirrorControl)=> void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ContentScriptType {
|
export enum ContentScriptType {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
import { lineNumbers, highlightActiveLineGutter, EditorView } from '@codemirror/view';
|
import { lineNumbers, highlightActiveLineGutter, EditorView } from '@codemirror/view';
|
||||||
import { completeFromList } from '@codemirror/autocomplete';
|
import { completeFromList } from '@codemirror/autocomplete';
|
||||||
import { CodeMirrorContentScriptModule, ContentScriptContext } from 'api/types';
|
import { MarkdownEditorContentScriptModule, ContentScriptContext } from 'api/types';
|
||||||
//
|
//
|
||||||
// For the above import to work, you may also need to add @codemirror/view as a dev dependency
|
// For the above import to work, you may also need to add @codemirror/view as a dev dependency
|
||||||
// to package.json. (For the type information only).
|
// to package.json. (For the type information only).
|
||||||
@ -15,7 +15,7 @@ import { CodeMirrorContentScriptModule, ContentScriptContext } from 'api/types';
|
|||||||
// const { lineNumbers } = joplin.require('@codemirror/view');
|
// const { lineNumbers } = joplin.require('@codemirror/view');
|
||||||
|
|
||||||
|
|
||||||
export default (_context: ContentScriptContext): CodeMirrorContentScriptModule => {
|
export default (_context: ContentScriptContext): MarkdownEditorContentScriptModule => {
|
||||||
return {
|
return {
|
||||||
// - codeMirrorWrapper: A thin wrapper around CodeMirror 6, designed to be similar to the
|
// - codeMirrorWrapper: A thin wrapper around CodeMirror 6, designed to be similar to the
|
||||||
// CodeMirror 5 API. If running in CodeMirror 5, a CodeMirror object is provided instead.
|
// CodeMirror 5 API. If running in CodeMirror 5, a CodeMirror object is provided instead.
|
||||||
|
@ -566,8 +566,8 @@ export interface CodeMirrorControl {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CodeMirrorContentScriptModule extends Omit<ContentScriptModule, 'plugin'> {
|
export interface MarkdownEditorContentScriptModule extends Omit<ContentScriptModule, 'plugin'> {
|
||||||
plugin: (codeMirrorControl: CodeMirrorControl)=> void;
|
plugin: (editorControl: CodeMirrorControl)=> void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ContentScriptType {
|
export enum ContentScriptType {
|
||||||
|
Reference in New Issue
Block a user