I’m trying to add a color and font size to some text using the CKEditor. As soon as I save it these are stripped out.
I’ve also noticed some tokens are stripped down when certain settings are enabled.
I went to add a bit of text in a different font and color but when I saved it and viewed the text the spans were stripped of their “style” tag.
I went to
config/content/formats/manage and enabled
Limit allowed HTML and added span to the list like so :
<a hreflang href> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol type start> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img src alt data-entity-type data-entity-uuid> <u> <s> <p> <h1> <pre> <table> <caption> <tbody> <thead> <tfoot> <th> <td> <tr> <span style>
After saving this all the attributes inside of span are still stripped. I also noticed that many of the tokens I was using (such as
site:url) are broken and only half of it remains.
I went back and disabled the
Limit allowed HTML option and then when I saved the text the styles and token would save properly.
When viewing the text in an email, the tokens had worked just fine but the span had it’s css striped.
I’ve tried looking for an answer but most are saying I need to enable and add the span to the limit html option but this definitely does not work for me.
There is also
Correct faulty HTML enabled, would that be a problem for this?
How can I enable in line styling with the CKEditor?