Is there any way to add <span> tags to Redactor II or the Redactor I plugin - would like to upgrade a site to latest version of Craft which had Redactor I and the https://github.com/aelvan/RedactorStyles-Craft plugin.

The site has some tags like <span class="blue-color"> etc.


It appears that Craft filters out <span> tags by default.

You can control this in two ways:

  1. By disabling the "Clean up HTML" setting applied to the custom field

    enter image description here

  2. For more control, you can create your own custom redactor config JSON file. It's discussed in the docs here:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.