Webkitallowfullscreen mozallowfullscreen allowfullscreen iframe

Iam trying to include a Vimeo Iframe in a webpage like this (JSX Code):

What gets rendered is this:

How can I implement the needed mozAllowFullScreen and webkitAllowFullScreen Attributes? In the React Docs (https://facebook.github.io/react/docs/dom-elements.html#all-supported-html-attributes) is only the allowfullscreen Attribute mentioned?

2 Answers 2

Try to pass true as a string. This works for me (React 16):

Атрибут allowfullscreen разрешает для фрейма полноэкранный режим.

Синтаксис

Значения

Значение по умолчанию

По умолчанию этот атрибут выключен.

Пример

Примечание

Internet Explorer поддерживает атрибут -ms-allowfullscreen .

Chrome до версии 27 и Safari поддерживают атрибут -webkit-allowfullscreen .

Firefox до версии 18 поддерживает атрибут -moz-allowfullscreen .

Браузеры ?

11 12 17 27 15 7 9 18

Браузеры

В таблице браузеров применяются следующие обозначения.

  • — элемент полностью поддерживается браузером;
  • — элемент браузером не воспринимается и игнорируется;
  • — при работе возможно появление различных ошибок, либо элемент поддерживается с оговорками.

Число указывает версию браузреа, начиная с которой элемент поддерживается.

Comments

Copy link Quote reply

kashifimran commented Jun 29, 2016 •

Expected behavior.

After setting $.FroalaEditor.DEFAULTS.htmlAllowedAttrs = $.FroalaEditor.DEFAULTS.htmlAllowedAttrs.concat([‘webkitallowfullscreen’, ‘mozallowfullscreen’, ‘allowfullscreen’]) I expect Froala would not remove these attributes.

Actual behavior.

The above attributes are removed.

Steps to reproduce the problem.
Browser.

This comment has been minimized.

Copy link Quote reply

stefanneculai commented Jun 30, 2016

Most probably you are not setting those attributes correctly, adding that code after initializing the editor. Could you please make a jsFiddle?

This comment has been minimized.

Copy link Quote reply

kashifimran commented Jun 30, 2016 •

Thanks for your response Stefan. I am not able to set up jsFiddle, as I get the "unlicensed error". Is there a key to be used on jsFiddle?

Читайте также:  Acrobat reader dc как убрать панель справа

Anyhow, the thing is that I am doing all initialization in one place and other things are working. The only thing not working is the above.

Here’s how I am setting it up (before initializing any editor).

This comment has been minimized.

Copy link Quote reply

stefanneculai commented Jun 30, 2016

You can just create a jsFiddle and ignore the unlicensed message. That doesn’t limit any of the editor’s features. Just set a height to the editor so that it makes the editable area high enough.

This comment has been minimized.

Copy link Quote reply

kashifimran commented Jun 30, 2016

Hi again, I found out the issue. A security library I am using deep down the line was stripping those. Thank you so much for your help & sorry for wasting your time!

Rate this post

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *