craftcms / redactor

Edit rich text content in Craft CMS using Redactor by Imperavi.
https://plugins.craftcms.com/redactor
MIT License
100 stars 49 forks source link

Colors not being removed when using the Fontcolor plugin #376

Closed angrybrad closed 2 years ago

angrybrad commented 2 years ago

Description

You can apply a color to text using the Fontcolor plugin, but you can't remove that color.

Steps to reproduce

  1. Fresh Craft and Redactor install of the latest releases.
  2. Use this for Redactor config.
{
  "buttons": ["html", "formatting", "bold", "italic", "unorderedlist", "orderedlist", "link", "image", "video"],
  "plugins": ["fontcolor"],
  "fontcolors": ["#7ED2F6"]
}
  1. Add some text to a Redactor field. Change the text color using the Fontcolor plugin.

  2. View the source and notice the color has been added:

<p>This is a test of the <span style="color: rgb(126,210,246)">emergency</span> broadcast system.</p>
  1. Save the entry. The color remains.
  2. Remove the color using the Fontcolor plugin.
  3. View the source again and notice the color has not been removed:
    <p>This is a test of the <span style="color: rgb(126,210,246)">emergency</span> broadcast system.</p>

Note, I'm not able to reproduce on https://imperavi.com/redactor/plugins/fontcolor/, which makes me think it's a Craft issue.

Additional info

andris-sevcenko commented 2 years ago

Fixed for the next release!