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

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.