Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
munir ishak e072d8b6d1 initial commit před 3 roky
example initial commit před 3 roky
img initial commit před 3 roky
newExample initial commit před 3 roky
readme initial commit před 3 roky
src initial commit před 3 roky
.gitignore initial commit před 3 roky
.npmignore initial commit před 3 roky
LICENSE initial commit před 3 roky
README.md initial commit před 3 roky
htmlCopy.gradle initial commit před 3 roky
index.js initial commit před 3 roky
package.json initial commit před 3 roky

README.md

React Native Rich Text Editor with react-native-webview

Visit original repo first

This resolves #171, #174, and #178

Inspirations

For now, the original library has problems of using two deprecated modules, ListView and react-native-webview-bridge-updated. ListView problem is solved by Ankit-96 ’s PR. So I focused on removing react-native-webview-bridge-updated and making use of react-native-webview.

What I did

  • Did just like what Ankit-96 did; replaced ListView with FlatList
  • Replaced react-native-webview-bridge-updated with react-native-webview
    • Instead of injecting MessageHandler into webpage(WebViewBridge) and sending message through sendToBridge, I directly inject zss_editor’s function calls through injectJavaScript. To achieve that, I fixed WebViewMessageHandler.js to be mapper function, translating functions of RichTextEditor to those of zss_editor.
    • In editor.html, replace WebViewBridge.send with ReactNativeWebView.postMessage
  • Added ./newExample. You should $ cd newExample; yarn; cd ios; pod install; cd ..; react-native run-ios;.

How to use it

  • $ yarn add https://github.com/jb-/react-native-zss-rich-text-editor
  • $ yarn add react-native-webview (I’m not sure why I have to do this)
  • $ cd ios; pod install;

Limitations

  • Tested on RN 0.61.5, iOS only.

  • Since I worked it for my project only, I did not test it on other versions or on Android platform. If any of you are familiar with both Android and iOS natives, please refer to my project and collaborate.

References