Feature Request - to extend support for HTML 5 markup
config.allowedContent = true<a href="#"><div class="a">something in A </div><div lass="b">some thing in B</div></a><div class="a"><a href="#">something in A </a></div><a href="#"><div class="a">something in A </div></a>
<div class="a"><a href="#">something in A </a></div>
This behavior has been noted in stackover flow
I have limited the scope of this issue so that it is better defined.
There will be a challenge with that, as we currently use a static DTD, while solving this issue will require from us using a context-aware model determination.
In your config.js file, add in the following config setting:
// Display all children elements allowed in a <a> element.
console.log(CKEDITOR.dtd[ 'a' ]);
// Simply redefine DTD like this:
CKEDITOR.dtd['a']['div'] = 1;
CKEDITOR.dtd['a']['p'] = 1;
CKEDITOR.dtd['a']['i'] = 1;
CKEDITOR.dtd['a']['span'] = 1;
// Check if <div> can be contained in a <p> element.
console.log( !!CKEDITOR.dtd[ 'a' ][ 'div' ] ); // default false
// Check if <a> can be contained in a <div> element.
console.log( !!CKEDITOR.dtd[ 'div' ][ 'a' ] ); // default true
For Drupal 8, you can add this code into your admin theme js, not the best solution but functional
Most helpful comment
In your config.js file, add in the following config setting:
For Drupal 8, you can add this code into your admin theme js, not the best solution but functional