How do I put a div around table with class = table-responsive? I want to put a div around tables in general and give them the class table-responsible. Therefore I changed the table.html.twig in my theme like this:

&lt;div {{attributes.addClass('table-responsive') }}&gt;
  &lt;table{{ attributes.addClass('table') }}&gt;
    ...
  &lt;/table&gt;
&lt;/div&gt;


But if I create a table in CKEditor nothing happend. It's only an ordinary table and nothing changed.

What did I do wrong?
CKEditor generates the table on its own. You can see this, if you switch to source. So the changes in twig will have no effekt, because the theme layer doesn't touch the source code that is coming out of the ckeditor. Only the filter layer is checking the source. More for security reasons. But it would be possible to change the table here, if you want to do it in drupal. Or you can modify the configuration of ckeditor itself.