Skip to content

Commit

Permalink
Desktop: Update plugin compatibility layer to allow more legacy plugi…
Browse files Browse the repository at this point in the history
…ns (e.g. Markdown Prettier) to run (#11033)
  • Loading branch information
personalizedrefrigerator authored Sep 12, 2024
1 parent ea61bfc commit c897cc1
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c897cc1

Please sign in to comment.