This is an awesome example, thanks for sharing! Are you doing any sort of optimisation on the server side, or is it parsing the entire page of markdown on every key press? Have you stress tested this on really long content just out of interest?
It’s parsing the entire Markdown content on each key press right now, which is definitely suboptimal for a product but fine for my needs.
It should certainly be possible to make this more efficient by either doing some smarter diffing of the in-progress document or using an operation-based update mechanism.
LiveView doesn’t yet have event debouncing built in, but it’s in the works, I believe, and that would help, as well.
That said, it’s currently fast enough writing a post of this length that while writing, I notice no significant lag in the live updates. By the time I stop typing and look at the preview, it’s up to date.