Markdown Support
This caught my attention on the forums, is this possible on Anking note type, because it would be game changer
https://forums.ankiweb.net/t/markdown-support/52895/6
This is really cool! Maybe would be best as its own note type? Looks like you kind of need to choose one or the other.
@abdnh @RisingOrange what do you guys think?
Or... could this just be built into Anki?
It could be an band-aid solution, but its worth asking, here is the source code of the snippet https://github.com/zerodevx/zero-md
Waiting for devs responses
I agree, this is very cool!
We could make a new note type for it.
Or... could this just be built into Anki?
Apparently there were plans for this:
- https://forums.ankiweb.net/t/anki-markdown-formatting/1577/2?u=floatingorange
- https://forums.ankiweb.net/t/any-updates-on-the-markdown-official-integration/51109
@AnKingMed Would you want some existing note types to use markdown?
One of the issues of using markdown-zero with Anki is that the default Anki editor renders html and is not compatible with markdown. That's why they were recommending to turn on the html-editor in the thread on the Anki forum. Ideally, Anki would have an editor which renders markdown, like Obsidian.
I made a quick Basic - Markdown note type which works offline: Basic.-.Markdown.zip
The zip contains an apkg file, a css and a js file. To try it out, import the apkg file, and put the other files into Anki's media folder.
Would like to highlight this note type by ikkz which uses ByteMD, some features could be implemented in Anking note type such as selection options which pairs nicely with AnkingAI, and possibly edu integration such as B&B and First aid
IKKZ__BASIC.EN.MARKDOWN version 2.0.0
IKKZ_BASIC_TEMPLATE_EN version 1.3.2
The library used by ikkz, and its successor, haven't been updated and by searching alternatives on reddit these were the recommendations:
Good luck to yall
@AnKingMed Would you want some existing note types to use markdown?
Do you think it makes sense to put it with existing note types? Or just make a new one that's dedicated for markdown?
How difficult do you think it would be to just build this feature into Anki? Or do you think it'd be best as a note type thing only?
Would like to highlight this note type by ikkz which uses ByteMD, some features could be implemented in Anking note type such as selection options which pairs nicely with AnkingAI, and possibly edu integration such as B&B and First aid
This is really cool too. @RisingOrange @abdnh how difficult would it be to include something like this in the AnKing Note Types? Should we somehow merge this into AnkiHub instead (@andrewsanchez looping you in)
Native support for Markdown in Anki would be really cool, and it doesn't seem to be very difficult to do: The backend already uses Markdown a bit (for deck descriptions), and Anki's editor is quite extendible as it's based on CodeMirror.
@abdnh What if we made a Markdown-enabled note type that is compatible with HTML formatting and Anki's current editor?
The advantages would be:
- You wouldn't have to change any of your existing note contents
- You could use Anki's default editor. For example, the formatting buttons in Anki would still work as usual
The Markdown note types I tried out so far don't work that way:
- The Markdown templates from ikkz/anki-template ignore HTML formatting
- The note type using zero-md is incompatible with the default Anki editor. For example, when you try to create a Markdown list, it doesn’t render properly because zero-md expects newlines instead of
<br>tags between items
One idea is to use a Markdown processor that supports inline HTML while also handling the newline issue with Anki's editor. For example, we could implement a preprocessing step that converts <br> tags into newline characters before the Markdown is rendered.
There could be some issues with:
- How the HTML generated from Markdown is styled (we would probably need to adjust the CSS of note types)
- Edge cases with mixes of HTML and Markdown
- The note editor would show a mix of WYSIWYG (for the html formatted text) and raw Markdown, which is a bit weird
@RisingOrange Sounds good. Certainly doable.