From ef0d9240b3ac202c9683f16f1cc27d30d6216ba6 Mon Sep 17 00:00:00 2001 From: Ryan McCue Date: Mon, 13 Jan 2020 21:56:27 +0000 Subject: [PATCH 1/3] Upgrade react-native-tinymce to 0.1 --- package.json | 2 +- yarn.lock | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 2e1f1b4..3761c0f 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "react-native-reanimated": "~1.4.0", "react-native-safe-area-context": "0.6.0", "react-native-screens": "2.0.0-alpha.12", - "react-native-tinymce": "^0.0.6", + "react-native-tinymce": "^0.1.1", "react-native-webview": "7.4.3", "react-redux": "6", "react-router-native": "5", diff --git a/yarn.lock b/yarn.lock index a05c395..d18b144 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1203,6 +1203,11 @@ "@react-navigation/routers" "^5.0.0-alpha.18" color "^3.1.2" +"@rmccue/sfsymbols@^0.0.2": + version "0.0.2" + resolved "https://registry.yarnpkg.com/@rmccue/sfsymbols/-/sfsymbols-0.0.2.tgz#fb276aa57f3ba99f60010524574574145d425351" + integrity sha512-IOATlJatTEAvp68gLBfNuWSvkOf7dD83h9SLJ665cs15r/cFOIzdzCsZW6VPtiawyZ4mSTKohK9j1l+YX2cRFg== + "@types/babel__core@^7.1.0": version "7.1.3" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.3.tgz#e441ea7df63cd080dfcd02ab199e6d16a735fc30" @@ -6130,11 +6135,12 @@ react-native-screens@2.0.0-alpha.12: dependencies: debounce "^1.2.0" -react-native-tinymce@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/react-native-tinymce/-/react-native-tinymce-0.0.6.tgz#6b17d2bb7e456a471971518fac2729021096bef9" - integrity sha512-DchltdSySruWHYLQkEbXapp1wY5bgwi4xIcFzZpErAgWrWe65Tz3utWPyXnL6/ligi28BVgNnCgTWJdk5Tjdkw== +react-native-tinymce@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/react-native-tinymce/-/react-native-tinymce-0.1.1.tgz#07390fa971ca00be94d08145a02fc7a38c95c1e1" + integrity sha512-Axjet5UQgcwZoiTq1LNFy0ixm/QckZwpesPm5iDqXiVocFSLrwjyfTDQFt5nZY9OiBk/03YTpTzDRXD8H6jTQw== dependencies: + "@rmccue/sfsymbols" "^0.0.2" react-native-keyboard-accessory "^0.1.10" tinymce "^5.1.5" From ee050b7e75af9fcf294c1f94ffbc585c5fc7f209 Mon Sep 17 00:00:00 2001 From: Ryan McCue Date: Mon, 13 Jan 2020 22:01:52 +0000 Subject: [PATCH 2/3] Switch to use provider-style import --- components/Posts/EditContent.js | 50 ++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/components/Posts/EditContent.js b/components/Posts/EditContent.js index 77a9871..a108094 100644 --- a/components/Posts/EditContent.js +++ b/components/Posts/EditContent.js @@ -9,7 +9,7 @@ import { TextInput, View, } from 'react-native'; -import { Editor } from 'react-native-tinymce'; +import { Editor, Provider, Tools } from 'react-native-tinymce'; import { connect } from 'react-redux'; import Icon from '../Icon'; @@ -133,29 +133,33 @@ class EditContent extends Component { const { post } = this.props; return ( - - + this.props.onChangePropertyValue( 'title', value ) } + onSubmitEditing={ () => {} } + /> + + this.editor = ref } + contentCss={ CONTENT_CSS } + placeholder="Start writing…" + value={ post.content ? post.content.raw : null } + /> + + + + + ); } } From 7ae0c7dd82baad4d9e1f202611a9ab00431d76c0 Mon Sep 17 00:00:00 2001 From: Ryan McCue Date: Mon, 13 Jan 2020 22:16:11 +0000 Subject: [PATCH 3/3] Update react-native-tinymce to 0.1.2 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 3761c0f..c50becf 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "react-native-reanimated": "~1.4.0", "react-native-safe-area-context": "0.6.0", "react-native-screens": "2.0.0-alpha.12", - "react-native-tinymce": "^0.1.1", + "react-native-tinymce": "^0.1.2", "react-native-webview": "7.4.3", "react-redux": "6", "react-router-native": "5", diff --git a/yarn.lock b/yarn.lock index d18b144..19f354c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6135,10 +6135,10 @@ react-native-screens@2.0.0-alpha.12: dependencies: debounce "^1.2.0" -react-native-tinymce@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/react-native-tinymce/-/react-native-tinymce-0.1.1.tgz#07390fa971ca00be94d08145a02fc7a38c95c1e1" - integrity sha512-Axjet5UQgcwZoiTq1LNFy0ixm/QckZwpesPm5iDqXiVocFSLrwjyfTDQFt5nZY9OiBk/03YTpTzDRXD8H6jTQw== +react-native-tinymce@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/react-native-tinymce/-/react-native-tinymce-0.1.2.tgz#0642951384bca607211f9c6423dfa416b5cf36e3" + integrity sha512-d76eZlh/MwyZTuLj/dyRqM2zD1S/AUl+GBxNRbcBE89YhRYGA+8khk199KGjJXxMzNpmXNSz8mRhA2xE4bTW+Q== dependencies: "@rmccue/sfsymbols" "^0.0.2" react-native-keyboard-accessory "^0.1.10"