Drupal 8.2.x Text Editor Stripping-removing "div Classes"
I have a problem with Druapl 8.2.1 text editor and CKeditor, system keeps stripping - removing classes from ' And example of this:
Solution 1:
Ok, well after breaking my head thinking and re thinking in all I have already done I just did what it was left to do.
Since there is no way to modify the allowedContent in Drupal version 8.2.x... what I did before it was to create a "New text format and editor" but I had selected the option "Limit allowed HTML tags and correct faulty HTML" and in the allowed HTML tags field I had all the classes I wanted to be accepted:
<div> <div class> <div id><a href hreflang> <em> <strong> <cite> <blockquotecite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <p> <br> <span>...
I just unchecked the "Limit allowed HTML tags and correct faulty HTML" and keep the "Correct faulty and chopped off HTML" option checked, saved and voila!!
Now Drupal keeps all my div classes.
Take into consideration that in the option "Text editor" I had selected "NONE", it do not work if "CKEditor" is selected.
:)
Post a Comment for "Drupal 8.2.x Text Editor Stripping-removing "div Classes""