Not specifically a Craft problem but I'm struggling to find an answer from Redactors site.

I've got over 100 occurrences of class="redactor-inline-converted" littered throughout the markup of Rich Text fields. How can I stop Redactor adding this class?

Update 2016-04-26

Here's the steps to recreate this. It's an odd thing between Redactor and Word.

  1. Have styled text in Word with a superscript
  2. Copy / paste in to Craft
  3. Add some text and format it
  4. Check the source and Redactor will add class="redactor-inline-converted"

This happens randomly on all tags:

<strong class="redactor-inline-converted"><em class="redactor-inline-converted">Superscript</em></strong>
<ul><li><em class="redactor-inline-converted">list item</em></li></ul>

Video example: http://sendvid.com/h41rosb3

  • What version of Craft/Redactor? Any idea on how they get inserted?
    – Brad Bell
    Apr 15, 2016 at 14:07
  • Craft CMS 2.6.2780 and whatever version of Redactor comes with Craft. The text is being copied from Word on Windows 7. Apr 19, 2016 at 8:31

1 Answer 1


Not a solution, but I strip it out as part of a cleanup macro that runs on body text.

{% macro cleanup(string) -%}
    {%- if string|length -%}
        {{- string|typogrify|replace('<p><br></p>','')|replace('redactor-inline-converted','')|raw -}}
    {%- endif -%}
{%- endmacro %}
  • 1
    Thanks @maxfenton I've done the same with a bit of regex but it would be good to have clean data stored as I never want these classes. Apr 19, 2016 at 8:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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