cvkmohan
Recently came across this great library leandrocp/mdex: A fast 100% CommonMark-compatible GitHub Flavored Markdown parser and formatter for Elixir. by our @leandrocp
I wanted to discuss about the library and realized there is no forum post introducing the library.
So, creating this thread. In the Phoenix LiveView, I just called Mdx.to_html() and voila - live preview is available.
Please explore.
Trending in Discussions
Hey there,
It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
I’ve been using Emacs as my main code editor for more than a two years. It’s a custom build version although I’ve tried doom emacs and sp...
New
Hi there! :wave:
@frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with.
But I don’t use it anymore.
Serverless was the promis...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Just published claude-code-elixir, a plugin marketplace for Claude Code with Elixir support. These are the plugins I’ve been using for my...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
cvkmohan
@leandrocp - embedding
A sigil never crossed my mind, but that’s easy to implement and a PR is very welcome!” / X (twitter.com)
heex componentsis in the pipeline? Leandro Pereira on X: “@pepicrft @elixirphoenix @chris_mccord Working on embedding components https://t.co/kthGZ7p1ujmayel
Use it and love it
leandrocp
The reason I’m not talking much about that library yet is because I’m still working on the API to manipulate AST and consequently allow extending it, think of how Req works but for Markdown. I’m glad it works for you!
leandrocp
Yep it’s in the pipeline. As soon as I solve AST manipulation it will be possible to format to HTML, HEEX, and even call arbitrary Elixir code. For context, https://mdxjs.com is a big inspiration for this library.
dkuku
I’m waiting for a elixir formatter plugin that will format my docs. I always have to redeploy to hex due to broken formatting
cvkmohan
BTW @leandrocp, how do we extend the library? am-kantox/md: Stream-aware markdown parser with custom syntax setting (github.com) and mudasobwa/markright: A customizable markdown parser in Elixir: pure pattern matching. (github.com) look two interesting projects.
One question I have is - if we want to support hashtags (#) or mentions (@) - is it better to go to Javascript libraries like Tiptap, Quill etc. or is there anything we can try using your sort of libraries?
Sorry - if the question is very naive.
leandrocp
@cvkmohan I’ve considered md and others but none of them did the job for my needs. I got excited with
mdand its extension capabilities but quoting its readme “If one needs to perfectly parse the common markdown,Mdis probably not the correct choice” so that was a major blocker.Regarding extending MDEx that’s what I have in mind: RFC - Extension API · Issue #37 · leandrocp/mdex · GitHub - the first part which is parsing the document (AST) and formatting to HTML is half way done (Elixir and Rust), so it’s in progress.
I’m not sure I follow your question, both Tiptap and Quill are rich text editors while MDEx is a Markdown parser/formatter. With MDEx you’ll be able to manipulate the document after it was written, either with Tiptap or any other editor. So let’s say for example you want to add a link to every tag in your document, ie: transform
#tag_ato[#tag_a](link)you’ll be able to traverse the AST and transform atextnode into alinknode. See RFC - Extension API · Issue #37 · leandrocp/mdex · GitHub for an example.Does it make sense?
leandrocp
Hi @dkuku what kind of broken formatting you get publishing to hex? I’ve had an issue or two with earmark but in overall it works fine.
The “formatter” in “A fast 100% CommonMark-compatible GitHub Flavored Markdown parser and formatter.” means converting markdown to HTML and potentially other formats, but I’m assuming you’re talking about a
mix formatplugin, right? Can you elaborate a bit more?cvkmohan
Thanks @leandrocp. Yes, you answered even my imaginary question.
Yes, I am looking at something like transforming text node into a link node. By using it - I intend to avoid using a Rich Text Editor. MDEx looks sufficiently fast - and - a split text box with source on the left - and - parsed results on the right should make Rich Text Editor unnecessary. And once you bring slab/delta-elixir: Simple yet expressive format to describe contents and changes
(github.com) into the mix, may be collaborative editing is possible entirely in the Elixir world!
Thanks for the answer. Will be looking forward to future releases.
mayel
If you’re looking for a way to parse and transform mentions, hashtags, and links: GitHub - bonfire-networks/linkify: Linkify is a basic package for turning website names into links. · GitHub