Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is really nice. Now HTML is not a concern anymore. Really fit the mental model of React.

Will try this in my current project. Thanks you very much.



Make sure you try it in any browsers you want to support, especially mobile. That's where the dragons are.

It also sucks to be in a position to say "lol sorry" to a user for being unable to do something in a major mobile browser when you could've gone with something more solid like ckeditor.


As i see, this editor only returns the blocks for you. How to render is upon you instead ? Or i miss something important here ?


Implementing render(blocks) -> html is trivial.

The hard part I'm referring to is making the WYSIWYG editor. Contenteditable takes things a step further by having you (editor + plugin implementors) intercept every native event and then reimplement that logic yourself, especially between click, hover, and touch (mobile) and browser differences between the events.

Since you said you were going to try it in your current project, I just wanted to warn you. I learned this the hard way when using Facebook's Draft.js on a simple chat box input. We moved to either ckeditor or tinymce iirc because support was more polished all around.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: