1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop: Update plugin compatibility layer to allow more legacy plugins (e.g. Markdown Prettier) to run (#11033)

This commit is contained in:
Henry Heino 2024-09-12 09:51:38 -07:00 committed by GitHub
parent ea61bfc498
commit c897cc1582
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -426,6 +426,12 @@ export default class CodeMirror5Emulation extends BaseCodeMirror5Emulation {
);
}
public getDoc() {
// The emulation layer has several of the methods available on a CodeMirror 5 document.
// For some plugins, `this` is sufficient.
return this;
}
public static commands = (() => {
const commands: Record<string, CodeMirror5Command> = {
...BaseCodeMirror5Emulation.commands,