From 3ca86517a692a597ec36de132bf4bacffd153c76 Mon Sep 17 00:00:00 2001 From: gray <13804087628@163.com> Date: Thu, 22 Feb 2018 10:04:33 +0800 Subject: [PATCH 1/5] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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": "*", From 7de86002483628802a49841865dd1796a59eff8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=8D=8E=E5=BD=AC?= <13804087628@163.com> Date: Tue, 17 Apr 2018 09:49:56 +0800 Subject: [PATCH 2/5] fix android insert image bug and publish --- package.json | 2 +- src/RichTextEditor.js | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 52284fab..9e602162 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "type": "git", "url": "https://github.com/wix/react-native-zss-rich-text-editor.git" }, - "version": "1.1.0", + "version": "1.1.1", "description": "React Native Wrapper for ZSSRichTextEditor", "main": "index.js", "license": "SEE LICENSE IN LICENSE", diff --git a/src/RichTextEditor.js b/src/RichTextEditor.js index 51e212ef..5c3af4c2 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 (Platform.OS === 'ios'){ + this._sendAction(actions.insertImage, attributes); 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() { From 212d5c2adf7cfc8be681694a0aee003992d3bb1e Mon Sep 17 00:00:00 2001 From: gray <13804087628@163.com> Date: Tue, 17 Apr 2018 10:01:04 +0800 Subject: [PATCH 3/5] Update RichTextEditor.js modify code --- src/RichTextEditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RichTextEditor.js b/src/RichTextEditor.js index 5c3af4c2..03af3a18 100644 --- a/src/RichTextEditor.js +++ b/src/RichTextEditor.js @@ -465,7 +465,7 @@ export default class RichTextEditor extends Component { } insertImage(attributes) { - if (Platform.OS === 'ios'){ + if (PlatformIOS){ this._sendAction(actions.insertImage, attributes); this._sendAction(actions.insertImage, attributes); this.prepareInsert(); //This must be called BEFORE insertImage. But WebViewBridge uses a stack :/ }else{ From d01acb5541ee88ab53a517d75105547fbf392877 Mon Sep 17 00:00:00 2001 From: gray <13804087628@163.com> Date: Tue, 17 Apr 2018 10:02:54 +0800 Subject: [PATCH 4/5] Update package.json revert version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9e602162..52284fab 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "type": "git", "url": "https://github.com/wix/react-native-zss-rich-text-editor.git" }, - "version": "1.1.1", + "version": "1.1.0", "description": "React Native Wrapper for ZSSRichTextEditor", "main": "index.js", "license": "SEE LICENSE IN LICENSE", From 255fe23ffce45a4b70b8567d1418bcc649ead297 Mon Sep 17 00:00:00 2001 From: gray <13804087628@163.com> Date: Fri, 20 Apr 2018 10:09:16 +0800 Subject: [PATCH 5/5] Update RichTextEditor.js --- src/RichTextEditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RichTextEditor.js b/src/RichTextEditor.js index 03af3a18..58d527fa 100644 --- a/src/RichTextEditor.js +++ b/src/RichTextEditor.js @@ -466,7 +466,7 @@ export default class RichTextEditor extends Component { insertImage(attributes) { if (PlatformIOS){ - this._sendAction(actions.insertImage, attributes); this._sendAction(actions.insertImage, attributes); + 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 :/