Topic Closed
Gökhan Sönmez
9 Posts
6.4K 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
267K 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
267K 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
267K 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
267K 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

Typesetter 5.1
8/12/2017

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

Over 8 Times Faster Than Wordpress
5/3/2016

We've known for a long time that Typesetter is fast. It's something we take pride ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Website * ...

Find out more about our Provider Spotlight

Log In

  Register