aqt.editor.NewEditor - addon compatibility / HyperTTS. We need to know the Deck

Recently, i started seeing bug reports of people experimenting with the new editor (“Shift editor control to TypeScript”). In HyperTTS, we aim to give users a one-click solution to add audio when entering new notes or editing existing notes.

This requires the following hooks / APIs:

  • knowing which deck we are in / which deck the user plans to add the note in.
  • knowing the note type.
  • and of course, the field contents.

getting the note type seems like it’s supported, using getNoteInfo().

getting the deck: when editing existing notes, looks like we can access editor.card, and get the deck id from there.

The real problematic issue is getting the deck when adding a new note. It doesn’t look like there’s a clean way. Claude says we can scrape the DOM but that’s obviously a hack.

@abdo any timeline as to when the legacy editor would disappear, just so I can be ready with HyperTTS ?

We don’t intend to remove the legacy editor anytime soon, at least without a full migration guide for add-ons. We’re still working on a long-term plan for the Qt migration and we’ll share details with the community when the time comes. For now I don’t recommend spending time supporting the new editor; implementation details might change as it we get more testing on mobile clients and the notetype/deck selectors will most likely be redesigned.

Got it, thank you so much for the update !