bug: Markdown Image not rendering correctly

Open
#6,239 8 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Demiserular is already working on this.

Since Apr 4, 2025.

  • #6275 by @cardoso — closed without merging

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
react-native, typescript
Domain
mobile

Research direction

Start with app/containers/markdown/Markdown.stories.tsx at the referenced Image story and inspect MarkdownImage in Storybook. Reproduce the layout with the provided markdown and compare it with the RNText/RNImage sample. Done means the markdown image no longer renders on top of the content that follows.

Written by the indexing model from the issue text.

Description

🐛 bug
Describe the Bug

Image is rendering on top of the rest of the content.

Steps to Reproduce
const mdText = `${lineBreakText} ![alt text](https://play.google.com/intl/en_us/badges/images/badge_new.png)`

export const Image = () => (
	<View style={styles.container}>
		<Markdown msg={mdText} />
		<View style={{ height : 1, backgroundColor : 'red' }} />
		<RNText>{lineBreakText} <RNImage source={{ uri: 'https://play.google.com/intl/en_us/badges/images/badge_new.png' }} style={{ width: 100, height: 100 }} /></RNText>
	</View>
);

I've added a red line to display where Markdown ends and where the Text sample starts.

Expected Behavior

No response

Actual Behavior
Image
Rocket.Chat Server Version

any

Rocket.Chat App Version

4.58.0

Device Name

any

OS Version

any

Additional Context

No response

Dominant language
TypeScript
Stars
2.4k
Forks
1.5k
Avg merge
1d 15h
Merged PRs (30d)
29

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from RocketChat/Rocket.Chat.ReactNative

All issues in RocketChat/Rocket.Chat.ReactNative

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.