From 05564c2fc17af85a6fb5ea73e01f1f4a9533f945 Mon Sep 17 00:00:00 2001 From: mahdichihi Date: Fri, 29 Nov 2024 10:16:09 +0100 Subject: [PATCH 1/3] RESOLVE : SyntaxError: node_modules\react-native-pell-rich-editor\src\RichEditor.js: Unexpected token, expected "," (61:6) --- src/RichEditor.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/RichEditor.js b/src/RichEditor.js index 7dbc384..77cd50b 100755 --- a/src/RichEditor.js +++ b/src/RichEditor.js @@ -57,7 +57,7 @@ export default class RichTextEditor extends Component { initialFocus, disabled, styleWithCSS, - useCharacter + useCharacter, defaultHttps, } = props; that.state = { @@ -144,7 +144,8 @@ export default class RichTextEditor extends Component { onMessage(event) { const that = this; - const {onFocus, onBlur, onChange, onPaste, onKeyUp, onKeyDown, onInput, onMessage, onCursorPosition, onLink} = that.props; + const {onFocus, onBlur, onChange, onPaste, onKeyUp, onKeyDown, onInput, onMessage, onCursorPosition, onLink} = + that.props; try { const message = JSON.parse(event.nativeEvent.data); const data = message.data; From 67cf17b83ee86645ecd5706072a1a3138ea8eb78 Mon Sep 17 00:00:00 2001 From: mahdichihi Date: Mon, 2 Dec 2024 15:22:14 +0100 Subject: [PATCH 2/3] adding heading1 icon --- img/heading1.png | Bin 0 -> 2904 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 img/heading1.png diff --git a/img/heading1.png b/img/heading1.png new file mode 100644 index 0000000000000000000000000000000000000000..33dd62da8a684a406e55c350de607f2373be947c GIT binary patch literal 2904 zcmai0dpy(YAO8{>QbuxTO+{hDLNqH{xnD*KwQ4g%vbl^gl9tw7LI-8#a*mFUOD5G) z=6+X`)IqacJLI@Dho*%5reCjfe!suYAJ6lAKJVxKd_JG&{k)#n>yzx^X0ITpAqN0} zf};c4Q@qkQ21rIcr)*MO6E6~xp7wSC`=!>OVn-^_*3}jOsxstPanfR6Hq5~{5&*!J z8$;srnsbu)z_sAxJ`^8U7i)iVC=5p+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Z6OsR?Z}!+BSfWM(F$-u z+9McKmXf=y1D=v`B(40%siv6 zp+PHQ9BsbjjP@pDRm&e2h?cGzDX}@!A97d4DO<^EfX@=q6omtBT~ XW&UbNzGL0G(cU^9bwji5&e8t^Wn3?z literal 0 HcmV?d00001 From 123adca0b63ede174ffea548440eb0f070b07ee9 Mon Sep 17 00:00:00 2001 From: mahdichihi Date: Mon, 2 Dec 2024 15:26:44 +0100 Subject: [PATCH 3/3] addinh heading1 to RichToolbar --- src/RichToolbar.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/RichToolbar.js b/src/RichToolbar.js index 4bfb0e0..e410228 100755 --- a/src/RichToolbar.js +++ b/src/RichToolbar.js @@ -28,6 +28,7 @@ function getDefaultIcon() { texts[actions.insertLink] = require('../img/link.png'); texts[actions.setStrikethrough] = require('../img/strikethrough.png'); texts[actions.setUnderline] = require('../img/underline.png'); + texts[actions.heading1] = require('../img/heading1.png'); texts[actions.insertVideo] = require('../img/video.png'); texts[actions.removeFormat] = require('../img/remove_format.png'); texts[actions.undo] = require('../img/undo.png'); @@ -114,7 +115,10 @@ export default class RichToolbar extends Component { if (this.editor && items !== selectedItems) { this.setState({ items, - data: this.state.actions.map(action => ({action, selected: items.includes(action) || items.some(item => item && item.type === action)})), + data: this.state.actions.map(action => ({ + action, + selected: items.includes(action) || items.some(item => item && item.type === action), + })), }); } }