Everytime I edit my node (with CKeditor 4.1.1), it occurs to my that my span-tags are removed, and that I have to put them there again manually.
There quite a lot of spans in there so this makes it an unacceptably tedious job for me (let stand for the client).
When I go to the Full CKeditor profile configuration (admin/config/content/ckeditor/edit/Full), and go for the "Cleanup and display" tab, I add the element 'span' in the field of Font Formats, which makes it look like this:
p;div;pre;address;h1;h2;h3;h4;h5;h6;span
However, when I hit the save button it returns the following error:
Enter a valid, semicolon-separated list of HTML font formats (no semicolon at the end of the list is expected).
So I filled out the following in the Custom JavaScript configuration field:
config.format_span = { element : 'span', attributes : { 'class' : 'normalSpan' } };
(Source) But this doesn't work either (CKeditor is not loading anymore with this).
Can anyone help me out with this?
Comments
Comment #1
knalstaaf CreditAttribution: knalstaaf commentedI've read that putting this in the Custom JavaScript configuration field (Advanced Options tab) should do the job:
config.allowedContent = true;
In this case the span-tag doesn't have to be added to the Font formats field and will remain untouched in your node.
(Source)
It seems to be working indeed, but is it recommended?
Comment #2
omrmankarFor This Solution, You can go to my blog you have got it solution.
http://toswebdeveloper.blogspot.in/2018/03/enable-span-tag-in-ckeditor-i...