Hi Guys,
im a little bit confused. I found a lot of topics with discusions about HTML5 Tags are supported by newer versions of the CKEditor and i also found some indications for HTML5 Tags in the .js files but at the moment i only find ways where people edit their dtd.js files and compile their own version.
I use CKEditor 4.3.4 (revision 40ccd20) from the downloadpage in a testproject but the Editor strips html 5 tags.
For example i put some html5 tags in the sourcemode:
<section> <article> <header>testheader</header> <figure><img src="" /><figcaption>testcaption</figcaption></figure> </article> </section>
Result after switching to wysiwyg and back:
<p>testheader</p>
<p>testcaption</p>
Do i have to activate this functionality or use it in other way?
Maybe someone can give me an explicit answer about the point that HTML 5 Tags work in newer Versions of CKEditor out of the box, yes or no ;-)
Thanks for your advice.
Greetings
That the Allowed Content
That the Allowed Content Filter stepping in. You can use for example config.extraAllowedContent to allow these tags.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
That the Allowed Content
Hi,
thx for your fast reply. So i have to explicit list every single html5 element in the extraAllowedContent section?
for example:
extraAllowedContent: 'section; article; header;' .....................
Greetings
Yes, it'd be something like:
Yes, it'd be something like:
And if you want to allow some attributes for them:
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Thx, i tried this and this
Thx, i tried this and this worked for my tested tags.
Im wondering that i actually cant find an adjusted config with adjusted extraAllowedContent Rules for html5 tags right now and i think im not the only one who tries to embed html5 support in his CKEditor ;-) .
BTW:
BTW:
1.) Tags containing an hyphen like extraAllowedContent: 'test-tag' wont work / still getting stripped. Are tags with hyphen underlaying some kind of reserved keywords or something else?
2.) Is it possible to allow tags with wildcards, for example allow every tag that starts with "test"? (testtag, testing....)
Thx a lot.
Personally I think that most
Personally I think that most of the people that want that kind of features just end up disabling ACF to avoid wasting the time with all those problems.
String format of ACF does not
String format of ACF does not allow incorrect (in HTML POV) characters in elements, attributes, classes and styles names. Or I should even say that it does not allow unusual characters, because HTML has very complicated characters sets in its grammar. To workaround this you can use the object format which doesn't have to be parsed so it's move forgivable. As for wildcards - that's not possible yet. In CKEditor 4.4 we introduced (will introduce as for the time I'm writing this) wildcards in attributes, classes and styles names, but not in element names, because for defining HTML purposes they are not necessary.
However, I should warn you that CKEditor is not "some XML editor". This is primarily an HTML editor and you would have to do more than just setting ACF, to make it work well with custom tags. For examaple - you should also extend CKEDITOR.dtd object. I cannot also guarantee that all CKEditor features will handle those custom tags, although I know that many people use them.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Ifram does not post in proper formate.
I have submit i frame like the below code in editor
<iframe align="middle" frameborder="0" height="315" scrolling="no" src="http://www.youtube.com/embed/qyUwqhoJzCk" width="560"></iframe>
But what i see in database or server
<img class="cke_iframe" data-cke-realelement="%3Ciframe%20align%3D%22middle%22%20frameborder%3D%220%22%20height%3D%22315%22%20scrolling%3D%22no%22%20src%3D%22http%3A%2F%2Fwww.youtube.com%2Fembed%2FqyUwqhoJzCk%22%20width%3D%22560%22%3E%3C%2Fiframe%3E" data-cke-real-node-type="1" alt="IFrame" title="IFrame" align="middle" src="http://localhost/wpumashup/ckeditor_new/plugins/fakeobjects/images/spacer.gif?t=E2PC" data-cke-real-element-type="iframe" data-cke-resizable="true" style="width:560px;height:315px;">
Can please any one suggest i need to save ifram as it is in database.
My config setting is
config.entities = false;
config.htmlEncodeOutput = false;
config.allowedContent = true;
Thanks to all
It seems that you retrieve
It seems that you retrieve data from editor in a wrong way. Use the editor.getData() method. But first of all - start new topic next time because you posted your question in totally unrelated one.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+