Skip to content

Commit

Permalink
publish 1.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
stulip committed Dec 18, 2020
1 parent 6365fdf commit 447271a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
21 changes: 12 additions & 9 deletions examples/src/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ class Example extends React.Component {
}

insertHTML() {
this.richText.current?.insertHTML(`<span style="color: blue; padding:0 10px;">HTML</span>`);
this.richText.current?.insertHTML(
`<span onclick="alert(2)" style="color: blue; padding:0 10px;" contenteditable="false">HTML</span>`,
);
}

onPressAddImage() {
Expand Down Expand Up @@ -251,6 +253,7 @@ class Example extends React.Component {
};

handleKeyboard = () => {
console.log('-----');
const editor = this.richText.current;
if (editor.isKeyboardOpen) {
editor.dismissKeyboard();
Expand Down Expand Up @@ -323,6 +326,9 @@ class Example extends React.Component {
/>
</ScrollView>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : 'height'}>
<TouchableOpacity style={styles.Keyboard} onPress={that.handleKeyboard}>
<Image source={keyboardIcon} />
</TouchableOpacity>
<RichToolbar
style={[styles.richBar, themeBg]}
editor={that.richText}
Expand Down Expand Up @@ -360,11 +366,8 @@ class Example extends React.Component {
}}
insertEmoji={that.handleEmoji}
insertHTML={that.insertHTML}
insertVideo={that.insertVideo}>
<TouchableOpacity style={styles.Keyboard} onPress={that.handleKeyboard}>
<Image source={keyboardIcon} />
</TouchableOpacity>
</RichToolbar>
insertVideo={that.insertVideo}
/>
{emojiVisible && <EmojiView onSelect={that.insertEmoji} />}
</KeyboardAvoidingView>
</SafeAreaView>
Expand Down Expand Up @@ -414,9 +417,9 @@ const styles = StyleSheet.create({
},

Keyboard: {
position: 'absolute',
right: 15,
bottom: 60,
marginRight: 10,
marginBottom: 5,
padding: 5,
alignSelf: 'flex-end',
justifyContent: 'center',
alignItems: 'center',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-native-pell-rich-editor",
"description": "React Native Rich Editor",
"version": "1.5.1",
"version": "1.5.2",
"main": "src/index.js",
"author": {
"name": "wxik",
Expand Down

0 comments on commit 447271a

Please sign in to comment.