Hello,
Please, is there anybody that could tell me how to prevent ckeditor to strip tag's attributes.
I add some span tags in the editor but ckeditor remove the class attributes of my span.
I didn't find anything in documentation about this.
Thanks by advance
zest
Please, is there anybody that could tell me how to prevent ckeditor to strip tag's attributes.
I add some span tags in the editor but ckeditor remove the class attributes of my span.
I didn't find anything in documentation about this.
Thanks by advance
zest
I think I found a way to work
I think I found a way to work this out.
Indeed, each time you load the editor, it remove all class atributes. It does so even if you select "source", add a class, then unselect "source", then select "source" again, you'll see that your class have vanished.
But I noticed that if you defined a class in the style file (ckeditor.styles.js) the way below, you can add it via the style menu in the toolbar and this way, the class remains :
{
name : 'My style name',
element : 'your html tag',
attributes :
{
'class' : 'your class name'
}
},
Hope that'll help !
If you are using CKEditor 4.1
If you are using CKEditor 4.1, this is probably because you did not configure the Advanced Content Filter settings. See the release blog post as well as some resources linked in it.
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help.
Visit the new CKEditor SDK for samples showcasing editor features to try out and download!