diff --git a/package.json b/package.json index 9ec89f52..52284fab 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "main": "index.js", "license": "SEE LICENSE IN LICENSE", "dependencies": { - "react-native-webview-bridge-updated": "^1.0.0" + "react-native-webview-bridge-updated": "^1.0.9" }, "peerDependencies": { "react": "*", diff --git a/src/RichTextEditor.js b/src/RichTextEditor.js index 51e212ef..58d527fa 100644 --- a/src/RichTextEditor.js +++ b/src/RichTextEditor.js @@ -465,8 +465,13 @@ export default class RichTextEditor extends Component { } insertImage(attributes) { - this._sendAction(actions.insertImage, attributes); - this.prepareInsert(); //This must be called BEFORE insertImage. But WebViewBridge uses a stack :/ + if (PlatformIOS){ + this._sendAction(actions.insertImage, attributes); + this.prepareInsert(); //This must be called BEFORE insertImage. But WebViewBridge uses a stack :/ + }else{ + this.prepareInsert(); //This must be called BEFORE insertImage. But WebViewBridge uses a stack :/ + this._sendAction(actions.insertImage, attributes); + } } setSubscript() {