Skip to content

Commit bb8f042

Browse files
authored
Merge pull request #20 from imnapo/np/feature-link
upgrade to the version 1.0.28
2 parents 1a664c3 + f80a39e commit bb8f042

7 files changed

Lines changed: 922 additions & 646 deletions

File tree

expo-demo/App.js

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class App extends Component {
4141
this.state.value = [getInitialObject()];
4242

4343
this.editor = null;
44-
44+
4545
}
4646

4747
onStyleKeyPress = (toolType) => {
@@ -305,49 +305,47 @@ class App extends Component {
305305
flexDirection: 'column',
306306
justifyContent: 'flex-end',
307307
}}
308-
>
309-
<MenuProvider style={{flex: 1}}>
310-
311-
<TouchableWithoutFeedback onPress={Keyboard.dismiss} >
308+
>
309+
<MenuProvider style={{flex: 1}}>
310+
<TouchableWithoutFeedback onPress={Keyboard.dismiss} >
312311
<View style={styles.main}>
313312
<CNRichTextEditor
314313
ref={input => this.editor = input}
315314
onSelectedTagChanged={this.onSelectedTagChanged}
316315
onSelectedStyleChanged={this.onSelectedStyleChanged}
317316
value={this.state.value}
318-
style={{ backgroundColor : '#fff', padding : 10}}
317+
style={{ backgroundColor : '#fff'}}
319318
styleList={defaultStyles}
320319
//foreColor=''
321320
onValueChanged={this.onValueChanged}
322321
//onRemoveImage={this.onRemoveImage}
323322
/>
324323
</View>
325-
</TouchableWithoutFeedback>
326-
327-
<View style={{
328-
minHeight: 35
329-
}}>
330-
331-
<CNToolbar
332-
size={28}
333-
bold={<MaterialCommunityIcons name="format-bold" />}
334-
italic={<MaterialCommunityIcons name="format-italic" />}
335-
underline={<MaterialCommunityIcons name="format-underline" />}
336-
lineThrough={<MaterialCommunityIcons name="format-strikethrough-variant" />}
337-
body={<MaterialCommunityIcons name="format-text" />}
338-
title={<MaterialCommunityIcons name="format-header-1" />}
339-
heading={<MaterialCommunityIcons name="format-header-3" />}
340-
ul={<MaterialCommunityIcons name="format-list-bulleted" />}
341-
ol={<MaterialCommunityIcons name="format-list-numbers" />}
342-
image={this.renderImageSelector()}
343-
foreColor={this.renderColorSelector()}
344-
highlight={this.renderHighlight()}
345-
selectedTag={this.state.selectedTag}
346-
selectedStyles={this.state.selectedStyles}
347-
onStyleKeyPress={this.onStyleKeyPress} />
348-
</View>
324+
</TouchableWithoutFeedback>
325+
326+
<View style={{
327+
minHeight: 35
328+
}}>
329+
330+
<CNToolbar
331+
size={28}
332+
bold={<MaterialCommunityIcons name="format-bold" />}
333+
italic={<MaterialCommunityIcons name="format-italic" />}
334+
underline={<MaterialCommunityIcons name="format-underline" />}
335+
lineThrough={<MaterialCommunityIcons name="format-strikethrough-variant" />}
336+
body={<MaterialCommunityIcons name="format-text" />}
337+
title={<MaterialCommunityIcons name="format-header-1" />}
338+
heading={<MaterialCommunityIcons name="format-header-3" />}
339+
ul={<MaterialCommunityIcons name="format-list-bulleted" />}
340+
ol={<MaterialCommunityIcons name="format-list-numbers" />}
341+
image={this.renderImageSelector()}
342+
foreColor={this.renderColorSelector()}
343+
highlight={this.renderHighlight()}
344+
selectedTag={this.state.selectedTag}
345+
selectedStyles={this.state.selectedStyles}
346+
onStyleKeyPress={this.onStyleKeyPress} />
347+
</View>
349348
</MenuProvider>
350-
351349
</KeyboardAvoidingView>
352350
);
353351
}

expo-demo/app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"ios",
1010
"android"
1111
],
12-
"version": "1.0.2",
12+
"version": "1.0.4",
1313
"orientation": "portrait",
1414
"icon": "./assets/icon.png",
1515
"splash": {

expo-demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"expo": "^31.0.2",
1111
"react": "16.5.0",
1212
"react-native": "https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz",
13-
"react-native-cn-richtext-editor": "^1.0.27",
13+
"react-native-cn-richtext-editor": "^1.0.28",
1414
"react-native-popup-menu": "^0.14.2"
1515
},
1616
"devDependencies": {

expo-demo/yarn.lock

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1645,6 +1645,11 @@ detect-newline@^2.1.0:
16451645
version "2.1.0"
16461646
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2"
16471647

1648+
diff-match-patch@^1.0.4:
1649+
version "1.0.4"
1650+
resolved "https://registry.yarnpkg.com/diff-match-patch/-/diff-match-patch-1.0.4.tgz#6ac4b55237463761c4daf0dc603eb869124744b1"
1651+
integrity sha512-Uv3SW8bmH9nAtHKaKSanOQmj2DnlH65fUpcrMdfdaOxUG02QQ4YGZ8AE7kKOMisF7UqvOlGKVYWRvezdncW9lg==
1652+
16481653
dom-walk@^0.1.0:
16491654
version "0.1.1"
16501655
resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018"
@@ -3725,11 +3730,12 @@ react-native-branch@2.2.5:
37253730
version "2.2.5"
37263731
resolved "https://registry.yarnpkg.com/react-native-branch/-/react-native-branch-2.2.5.tgz#4074dd63b4973e6397d9ce50e97b57c77a518e9d"
37273732

3728-
react-native-cn-richtext-editor@^1.0.27:
3729-
version "1.0.27"
3730-
resolved "https://registry.yarnpkg.com/react-native-cn-richtext-editor/-/react-native-cn-richtext-editor-1.0.27.tgz#7e322ee092708e9e93dfccf61ea1453a3b5254e7"
3731-
integrity sha512-tjETLCtQXMC46Dujwj967UsKzDUlb81yYkE4ttIqpCJwHI5W51HMRdjoXsd1P8XSnu98P5w3ZXfZkNhgsKicfQ==
3733+
react-native-cn-richtext-editor@^1.0.28:
3734+
version "1.0.28"
3735+
resolved "https://registry.yarnpkg.com/react-native-cn-richtext-editor/-/react-native-cn-richtext-editor-1.0.28.tgz#6c076f0c1eba4183f222d06eeef77600f18bff62"
3736+
integrity sha512-PzIbwwj1qIwxW9mcatvXmb8uNamNOYj1mFI1B0Hn/vxaVxksjxQBHBK8DDawF4D28pxhvCp6QlYY7C61QuyJ4Q==
37323737
dependencies:
3738+
diff-match-patch "^1.0.4"
37333739
immutability-helper "^2.8.1"
37343740
lodash "^4.17.11"
37353741
shortid "^2.2.14"

package.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-cn-richtext-editor",
3-
"version": "1.0.27",
3+
"version": "1.0.28",
44
"description": "RichText Editor for React-Native",
55
"main": "index.js",
66
"scripts": {
@@ -10,7 +10,8 @@
1010
"immutability-helper": "^2.8.1",
1111
"lodash": "^4.17.11",
1212
"shortid": "^2.2.14",
13-
"xmldoc": "^1.1.2"
13+
"xmldoc": "^1.1.2",
14+
"diff-match-patch": "^1.0.4"
1415
},
1516
"peerDependencies": {
1617
"react": "16.6.1",
@@ -26,7 +27,11 @@
2627
"type": "git",
2728
"url": "git+https://github.com/imnapo/react-native-cn-richtext-editor.git"
2829
},
29-
"author": "Narbe HS <imnapo@gmail.com>",
30+
"author": "Narbe HS <imnapo@gmail.com> (http://learncode.net)",
31+
"contributors": [
32+
"Narbe HS <imnapo@gmail.com> (http://learncode.net)",
33+
"Christ Kho <christ.khodabakhshi@gmail.com> (http://learncode.net)"
34+
],
3035
"license": "ISC",
3136
"bugs": {
3237
"url": "https://github.com/imnapo/react-native-cn-richtext-editor/issues"

0 commit comments

Comments
 (0)