Hacker News new | ask | show | jobs
by matteason 832 days ago
This is great. I've started building a little notes app in Vue and I was wondering how to handle WYSIWYG Markdown editing so I'll definitely be digging in to your code for inspiration. Do you mind giving us a quick overview of how it works technically?

It would be nice if you could change the block type after creating it. For example I don't think there's a way to change an h1 to an h2, or a bulleted list to a numbered list.

The collaborative editing is neat too, are you using a library for that or is it bespoke as well?

1 comments

Thanks for the kind words! I’ll definitely look into that

Most of the heavy work, including collaborative editing, is done with Facebook’s Lexical library. There’s also a Vue binding for Lexical, so you should try it! (https://github.com/wobsoriano/lexical-vue)

As for the backend, I wrote a server that runs on Cloudflare Workers and Durable Objects. Super impressive products, btw.

Brilliant, thanks - I'll check it out