strapi / blocks-react-renderer

A React renderer for the Strapi's Blocks rich text editor
Other
162 stars 25 forks source link

[feat]: Support for iframes in the Rich Text (Blocks) editor #52

Open thiagotnon opened 2 weeks ago

thiagotnon commented 2 weeks ago

A clear and concise description of what the feature is

This feature would allow the inclusion of iframes within the Rich Text (Blocks) editor in Strapi. By supporting iframes, users could embed external content, such as videos, interactive maps, and other multimedia, directly into their Strapi-managed content. This capability would enhance the flexibility and interactivity of content created in Strapi without needing to switch between Strapi and custom fields or code.

Why should this feature be included?

Adding iframe support would allow editors to seamlessly embed dynamic content from trusted external sources, improving the user experience and reducing the workload for developers. Currently, iframes are not natively supported, which limits the ability to add multimedia content without custom coding or using additional plugins. Including this feature would make Strapi more versatile and attractive for users needing embedded media.

Please provide an example for how this would work

In the Rich Text (Blocks) editor, users would have a block option named "Embed" or "Iframe." When selecting this block, users could paste a URL (e.g., from YouTube, Google Maps) or the iframe code directly. Additionally, the block could include basic settings for configuring iframe attributes such as width, height, and responsive scaling.