0

my ckeditor has this configuration: config.allowedContent = true;

If I insert this code into my editor:

<a href="#" class="circle large border"> <span class="icojam_anchor"></span> </a>

this is a simple link with span content

The script will be remove. Why? I need to disable the HTML correction. Is it possible?

Thanks Luca

Luca Santaniello
  • 161
  • 1
  • 11

1 Answers1

1

You need to disable removing empty span tags using CKEDITOR.dtd.$removeEmpty

For example, adding the following to the config.js

// allow span tags to be empty
CKEDITOR.dtd.$removeEmpty.span = 0;`

//The following allows i tags to be empty
CKEDITOR.dtd.$removeEmpty['i'] = false

Source: CKEditor strips <i> Tag

Community
  • 1
  • 1
Matt
  • 147
  • 9