Hello,
i'm a recent user of ckeditor version 4.4.5 and now work on a personnal CMS.
i'm using the inline editing mode and like to allow the <main> tag in the editor (to keep my CSS), the best for me would be to allow <main id="blocCKE" contenteditable="true">.
i tried (with no success) to allow the <main> tag at least in the block elements of dtd with
CKEDITOR.dtd.$editable[ 'main' ] = 1;
CKEDITOR.dtd.$block[ 'main' ] = 1;
CKEDITOR.dtd.$blockLimit[ 'main' ] = 1;
and configure it in the style.js of ckeditor with { name: 'Conteneur', element: 'main' }
So i've got different solutions (maybe changing the dtd in the core), i think i'm gonna change my CSS, but i'd like to know if there's a good way to make it possible and if there is some particular reasons to not have implemanted the <main> tag in the core DTD while almost all new html5 tags are.
Thank you.
If you want to enable editor
If you want to enable editor in the <main> tag you need to extend the dtd.$editable hash. I also created ticket about adding the <main> tag.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
thank you for your fast reply
thank you for your fast reply, so i'm gonna wait for the next version.
When you say extend the dtd.$editable, does it mean i've to insert this code: CKEDITOR.dtd.$editable[ 'main' ] = 1; ?
And in general for all the html5 tags, do i have to allow them in extraAllowedContent ?
When you say extend the dtd.
Check commits in this branch: https://github.com/cksource/ckeditor-dev/tree/t/12550
It depends, because e.g. if you configure styles dropdown to contain styles for HTML5 tags they will be allowed by default. Read more about the ACF.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
It depends, because e.g. if
i tried first the styles dropdown but wasn't sure it was the good method, i saw this topic about ACF and html5 tags and thought it was better. BTW both methods works good for me.
thx again for your active work.