CKEditor removes class attribute from table
ckeditor, css, html
Solution
I had a similar issue where opening and saving with CKEditor 7.x.1.13 in Drupal 7 was stripping out attributes in my HTML elements. Adding the following under "Custom JavaScript configuration" fixed it.
config.allowedContent = true;
Problem
In my `<textarea>`, I have this text: ``` <table class='table table-striped'> <tr> <td>1</td> <td>2</td> </tr> </table> ``` After using `CKEDITOR.replace()`, my text area become a CKEditor and it has a table in it. The problem is CKEditor adds its class to my table called `cke_show_border`. Only attributes in that class are applied to the table, none of my class is applied. What should I do to make it apply my `table` and `table-striped` class? Thanks for your help.