2

I'm building my own component, and trying to insert a youtube embed url in a tinymce editor field. However, the editor keeps removing the iframe tags from the text.

I followed the recommended settings, by removing 'iframe' from the tinymce plugin 'prohibited elements' setting.

In my component fields xml, a field for the editor is created:

<field name="biography" type="editor" filter="raw" label="LABEL_HERE" description="DESC_HERE" hint="PLACEHOLDER_HERE"/>

The filter type is raw, and the type is editor.

I'm logged in as the 'super user', and have the global configuration text filtering for super users on 'no filtering'.

I hope that i'm missing something, it keeps me busy for several hours now. Kind of frustrating :D

  • 2
    To find the answer, have you tested 2 things? 1. is the iframe code still there as soon as you close your html popup? If so: 2. could you print_r your entire post before your component starts filtering, maybe in the root constructor to see if it still contains the iframe? This way we can see if your component is the problem or the editor. – Hans Wassink Sep 6 '17 at 12:59
  • @HansWassink as soon as I close the html popup (i think you meant the source code popup in the editor) the iframe element is gone. It is never added to the tinymce textarea... – David Kooijman Sep 6 '17 at 13:01
  • Well that leaves out the filter option. Could you check the source code for the page that your tinymce is on and check the values for extended_valid_elements and valid_elements. Maybe your component overrides the default Joomla TinyMCE settings. One of these values needs iframe. – Hans Wassink Sep 6 '17 at 13:29
  • Indeed! the valid_elements in the source of the page are still the same! Looks like a bug in joomla. Will send them a ticket. Thanks – David Kooijman Sep 6 '17 at 14:58
1

There are several tags that are prohibited by the Joomla text filter.

Go to Global Configuration Click the "Text Filters" tab.

At the bottom of that page, you'll see a yellow section where it defines tags present in the default blacklist.

Any usergroup that's been assigned the default blacklist will be restricted/prevented from using the tags in the blacklist.

This is not a bug - it's a security feature.

Solution - unblacklist yourself.

  • Super User is on the "No Filtering" Filter type. Didn't make a difference though. Issue was in the component we created. Thanks for the info though! Could be helpfull to others. Will accept this as the answer. – David Kooijman Jan 22 '18 at 21:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.