froala / react-froala-wysiwyg

React component for Froala WYSIWYG HTML Rich Text Editor.
https://froala.com/wysiwyg-editor
565 stars 131 forks source link

Froala editor removes allow attribute from iframe #328

Open accel9 opened 2 years ago

accel9 commented 2 years ago

we are using react-froala-wysiwyg v 4.0.4. I am adding iframe using froala editor code view and it auto removes allow attribute.

I am trying to add below code from code view <div><iframe src=https://vpb.noonah.com/211124vpbdemo?ondemo=1 allow="camera;microphone" style="max-width: 800; width: 100%; height: 720px; border: none;" width="1000" height="720" frameborder="0"></iframe></div>

The code which is saved is shown below, it does not have allow attribute <div><iframe src="https://vpb.noonah.com/211124vpbdemo?ondemo=1" style="max-width: 800; width: 100%; height: 720px; border: none;" width="1000" height="720" frameborder="0"></iframe></div>

why froala editor removes 'allow' attribute? is there any way to override default behavior to allow 'allow' attributes?

hmoffatt commented 3 months ago

You can configure the allows attributes - https://froala.com/wysiwyg-editor/docs/options/#htmlAllowedAttrs