Draft.js and React Native
Asked Answered
J

1

7

Has anyone tried to port DraftJs with React Native. Any ideas how to do it?

https://github.com/facebook/draft-js/issues/138

Johannejohannes answered 28/7, 2016 at 3:5 Comment(1)
Ask the chat room? github.com/facebook/draft-js/blob/master/…Milfordmilhaud
M
4

As the link showing, It's a hard work to implement a complete new native version editor with current draft model. Some hard points are I can see:

  1. Keyboard and cursor control. editable content did much help for it in Draft. editable content is already supported by browsers.
  2. Draft model is composed with blocks and inline-things. It's match the HTML model, making map Draft model to DOM easily. But iOS/Android layout not composed with block and inline-things.
  3. H5 has flex and powerful style control. You can use all CSS styles in Draft with the help of style mappers, leaving the render work to browsers. But how it work in native? Android/iOS SDK not provide such powerful style control to the views.

After all, Draft is announced as a Editor Framework, not a ready to use editor. It's OK to limit your editor functions and have a native version, but I'd rather to embed a WebView to have a really powerful H5 Editor.

Mordant answered 28/7, 2016 at 4:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.