Remix.run Logo
cyber_kinetist 6 hours ago

I just wish there was a native Markdown renderer / editor library in C that I can use cross-platform - in the style of something like IMGUI (where the library outputs a list of primitives for you to render yourself in any graphics API).

Or well... since we now have Claude I might have a jab at this someday in my free time.

nicoburns 6 hours ago | parent [-]

For just rendering (no editing) you could use https://github.com/litehtml/litehtml (C) or https://github.com/DioxusLabs/blitz (Rust).

Both are actually lightweight HTML rendering libraries, so you need to compile markdown to HTML to use them. But there are many libraries for that.

bobajeff 5 hours ago | parent | next [-]

The link says litehtml is C++. I can't tell if it exposes an FFI (I bet not)

Of course blitz doesn't expose a FFI either and also if you need anything interactive you have to use the dioxius framework or implement you own APIs for that as well as take care of animation yourself.

cyber_kinetist 6 hours ago | parent | prev [-]

Does it mix well with text input? What I really want is a native WYSIWYG Markdown editor - in a similar fashion to Typora (Electron) or Milkdown (a JS library).

nicoburns 6 hours ago | parent [-]

Blitz has good plaintext text input support. But there's no contenteditable (which is what you would need for rich text editing) yet.

litehtml appears to have no built-in text input support so far as I can see.