Topic Closed
Gökhan Sönmez
9 Posts
6.6K Downloads
1 Themes
CKEditor deletes iframe tags from source code. Is it posible to allow iframe tags in CKeditor?
7 years ago#5626

Josh S.
2K Posts
283K Downloads
16 Themes
18 Plugins

Interesting. It looks like the new ACF (Advanced Content Filtering) in CKEditor 4.1 strips out the iframe tags. There are a couple of ways to work around/with ACF according the docs:

  • Setting allowedContent = true ( This isn't ideal though. Looking at the source html with this setting displays text like this: <a _cke_saved_href="... )
  • Set extraAllowedContent = 'iframe'. ( This sort of works. Though additional configuration appears to be needed to define which attributes are allowed within the iframe)

It seems like a bug with 4.1

7 years ago#5632

Josh S.
2K Posts
283K Downloads
16 Themes
18 Plugins
Ok, I just submitted this bug in ckeditor: https://dev.ckeditor.com/ticket/10210
7 years ago#5634

Hello, I can confirm :

same problem for me.

 

Even with "allowedContent = true" it doesn't fully work as we can't change the size of the frame.

Something strange is that the first time I have inserted an iFrame it worked... But then I edited my page and it disapeared

 

7 years ago#5635

Josh S.
2K Posts
283K Downloads
16 Themes
18 Plugins
So this is a result of how they've designed the ACF feature. If the "Iframe" button isn't in the toolbar, CKEditor assumes that <iframe> tags shouldn't be allowed in the content.
7 years ago#5639

Josh S.
2K Posts
283K Downloads
16 Themes
18 Plugins

Ok, I've added the following line to the CKEditor config and it seems to be working as  it did before.

                        'extraAllowedContent'        => 'iframe[align,frameborder,height,longdesc,marginheight,marginwidth,name,sandbox,scrolling,seamless,src,srcdoc,width]; *[accesskey,contenteditable,contextmenu,dir,draggable,dropzone,hidden,id,lang,spellcheck,style,tabindex,title,translate](*)',

 

7 years ago#5640

Topic Closed

 

News

elFinder 2.1.50 in Upcoming Release
12/28/2019

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1
8/12/2017

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News

HH-Support

Company located in Tórshavn, Faroe Islands. * Webpage Design * Consultant & Provider of a wide range of programs for visually impaired and dyslextics.

Find out more about our Provider Spotlight

Log In

  Register