I'm using ckeditor in metronic 8 but I'm observing a problem with italic text format inside the editor. Specifically each time any text is set italic its color became gray.
This happens because CKEditor uses tag
<i> to set text to italic but metronic themes css settings force
<i> to be gray and is set as "!Important".
Searching for a possibile workaround I've found that In version 4 of CKEditor the tag used for italic text was configurable so it was possible change the default tag
. Unfortunately this doesn't appear to be feasible with CKEditor 5 which is integrated in metronic 8 (navigate to ckeditor documentation and search for coreStyles_italic).
This behaviour can be easily reproduced using the examples available in ckeditor classic example or ckeditor document example
Are there any workaround or specific configurations to avoid this behaviour?
i tag is used for icons so we set default color as
color: var(--kt-text-muted);. We will fix it in the next update and if the tag is used with the class we put the above color, otherwise, it will use the default body font color.
You can fix it by replacing the code in
src/sass/components/helpers/_text.scss as shown below: