Where are editor JavaScript functions defined?

I’m looking for where JavaScript functions available (and used) in the editor, such as setFormat(), wrap() and toggleEditorButton(), are defined.
These were previously defined in editor.ts, which no longer exists (and I have insufficient git-fu to figure out when it was removed). setFormat() now appears to be defined in old-editor-adapter.ts but I lack the knowledge of TypeScript to discern where the others might be.

(This is partly to the end of figuring out what the parameters of Editor.addButton() do, so if there’s documentation somewhere please point me to it.)

Most of them are set in NoteEditor.svelte. I recommend to learn how to use a tool like grep (or ripgrep).

3 Likes

(It looks like the toggleEditorButton() references in editor.py may currently be referencing a missing function)