Inline images in message?
See original GitHub issueIssue Description
Trying to get inline images in messages to work. Adding a separate pattern and renderText
function. But they end up in the same line as the text. I would like them to be on separate lines and split the text.
It also never replaces all occurrences of my pattern, just the first one?
Steps to Reproduce / Code Snippets
renderImage = (matchingString, matches) => (
<View
style={{
paddingVertical: 10,
}}
>
<MessageImage currentMessage={{ image: matches[1] }} />
</View>
);
render() {
return (
<SafeAreaView style={styles.screen}>
<GiftedChat
parsePatterns={() => [
{
pattern: /\[IMG:(.+?)\]/gi,
style: {},
onPress: () => {},
renderText: this.renderImage,
},
]}
/>
</SafeAreaView>
);
}
Additional Information
- Nodejs version: v8.9.4
- React version: 16.3.1
- React Native version: 0.55.4
- react-native-gifted-chat version: ^0.4.3
- Platform(s) (iOS, Android, or both?): iOS
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
How to Insert an Inline Image in an Outlook Message
Follow these steps to add an inline image to your email: Start a New Email. Your message will need to be in HTML...
Read more >Inline images are no longer showing, it only has text saying ...
If I compose a message in gmail with an inline image either by upload or copy/paste, it will appear to be inlined in...
Read more >How to Embed Images in Your Emails (CID, Inline & More)
3 ways to embed images in emails. 1. CID embedded images (inline images). To me, CID (or Content-ID) feels old, and something very...
Read more >How do I get back inline image display in email? | Thunderbird ...
Now you have a menu with a View option, you can use it to display attachments inline, and also to view messages in...
Read more >How to Embed Photos in Email Messages
How to Embed Photos in Email Messages. Embedding images in an email message involves adding the message into the text, much as they...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, I am using react-native-gifted-chat and i wanted to know, how to restrict the user to input any phone number or email address in chat ??
In My second scenario, I want to replace my chated phone number or email with ********* so that the end user cant see the shared number or email for the privacy reason.
PLEASE HELP I AM NEW WITH THIS LIBRARY
Thank You so much @emilkarl, it’s working 👍