2
votes

Found a very similar question here: CKEditor classes being stripped

I am using CKEditor 4.2, and I have found it automatically changes content/formats.

For example I have a plugin which automatically creates a new page and a link to it in the text editor, if I create a new page called 'newPage' it creates this code:

    <p>&nbsp;</p>

    <p><a class="wiki_page_link" href="newpage">newpage</a></p>

This is shown when I click the source button on the CKEditor, now if I click it again, it shows the button again but it's different, AND if I click the source button to view the source code again it displays this code:

    <p>&nbsp;</p>

    <p><a href="newpage">newpage</a></p>

Now I don't know why CKEditor has automatically changed the link, but now the link won't work. And this is occurring a number of times, for example if I add a new link using the same plugin then the original 'newPage' link is automatically changed. If I have an image of set n x m width and height then load the CKEditor then the width and height are discarded and the image is set to it's default size. If a title is set to be in the center and the CKEditor is used to change the page this centering is defaulted to the normal left of the page.

Any advice would be appreciated,

Thank you

1
Why don't you use the answer provided in the other question?AlfonsoML
I found a solution, the solution to the other question wasn't what I was looking for in the end.Jim

1 Answers

3
votes

I have finally found a solution to this. The reason it took me so long is because links like this: CKEditor classes being stripped

to the CKEditor website always say you turn CKEDITOR.config.allowedContent to 'true' and it only provides examples to trying to turn off individual plugins, but I needed to disable it over the entire system.

To disable Advanced Content Filtering throughout the entire CKEditor - in the config.js file insert the line:

    config.allowedContent = true;

Hope this helps someone else.