Hacker News new | ask | show | jobs
by shadowgovt 1865 days ago
> Kind of surprised

I'd assume a significant cost-benefit tradeoff. For all its flaws, the DOM rendering algorithm is at least "document-like," so there's a lot of wheel-reinventing to do going from just using the DOM to a custom document layout implementation underpinning a canvas-targeted rendering algorithm.

1 comments

Look at the Google docs generated html markup some time. It’s not making nice neat <p>’s and <h1>’s.
Yes, at OrgPad, we are writing our own rich text editor and if you want to use the DOM approach, you don't have much choice than to do it like this. You can see the WIP demo here (in Czech but it is quite visual): https://www.youtube.com/watch?v=SkFJ1zcRjQY It is also written in ClojureScript. Some of the reasoning is here (in English, but 3 hours long): https://www.youtube.com/watch?v=4UoIfeb31UU
How? I thought they blocked access to the native underlying document format. Or do you mean the HTML export?
I assume your parent means the result of clicking inspect element in the (pre-canvas) editor.