Skip to content

Conversation

@richterb
Copy link
Contributor

@richterb richterb commented Oct 21, 2025

Summary

The goal for this PR is to add support for images in Markdown content rendered by MarkdownText.

Changes

  • Load the image feature of MarkdownIt
  • Update MarkdownIt while we're at it. There's no direct need for it, but why not keep up to date. No breaking change in the changelog

Breaking Changes

None

Changelog

We added support for images in MarkdownText.

Open discussion

Security-wise, MarkdownIt validates and normalizes URLs (https://github.com/markdown-it/markdown-it/blob/master/lib/rules_inline/image.mjs#L40-L45) with what I think is a very good approach: https://github.com/markdown-it/markdown-it/blob/master/lib/index.mjs#L34-L61

To be tested

Does it render images consistently in Storybook?
Does the Text block in Studio work as well as before?

Review checklist

  • Description is complete
  • Commits respect the Conventional Commits Specification
  • 2 reviewers (1 if trivial)
  • Tests coverage has improved
  • Code is ready for a release on NPM

@richterb richterb force-pushed the feat/markdown-images branch from d4c0ad1 to 0c567f7 Compare October 21, 2025 14:57
@richterb richterb requested a review from wmai October 22, 2025 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant