milesj / interweave

🌀 React library to safely render HTML, filter attributes, autowrap text with matchers, render emoji characters, and much more.
https://interweave.dev
MIT License
1.1k stars 38 forks source link

Youtube embed video with the iframe is not loading the video on the browser. #235

Closed humphrey-mutuma closed 2 years ago

humphrey-mutuma commented 2 years ago
milesj commented 2 years ago

@humphrey-mutuma iframes are not allowed by default for security reasons. You need to use transformers I believe to make it work.

humphrey-mutuma commented 2 years ago

@humphrey-mutuma iframes are not allowed by default for security reasons. You need to use transformers I believe to make it work.

Do you have any references on how to use transformers to make it work? or may be some sample code would be of great help.

milesj commented 2 years ago

There's only examples in the docs: https://interweave.dev/docs/parser#replacing-elements

humphrey-mutuma commented 2 years ago

There's only examples in the docs: https://interweave.dev/docs/parser#replacing-elements

Thanks.