Answer the question
In order to leave comments, you need to log in
WYSIWYG and BEM, how to make friends?
Good afternoon.
The BEM methodology recommends even in content, ie. add classes everywhere for paragraphs, links, headings, tables, and so on.
How can this be done automatically in Ckeditor, or maybe there is an editor more suitable for this?
Now I have global styles for text elements, of course you can blackbox them in the inside of one block (eg .wusiwyg) but this is even worse.
Answer the question
In order to leave comments, you need to log in
Just for places where you need to insert content through the editor, make a wrapper, like <div class="text">
, and through cascading, set styles for the corresponding tags.
.text p {}
.text h1 {}
.text a {}
.text ul {}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question