Hi guys!
I'm using Uploadcare for uploading and storing images, which is working.
However, it appears CKEditor 4.1.1 is choking on these images.
1. Adding an image via CKEditor.
The initial placement of the image is as expected. However, when the data is saved, CKEditor is clearly doing something weird, prior to committing the data.
In several tests, during the formatting and rearrangement of the HTML, CKEditor is stripping out the "style" image attribute and the first opening double quote, which I can see in the text data on the database itself.
This behavior is entirely reproducible.
2. Editing an image via CKEditor.
Initially, the image looks fine. But when I view the source, the HTML for the image is sanitized to render as text, and not to render as an image object.
3. Disabling 3rd party Plugins.
As mentioned previously, I'm using Uploadcare, in addition to Word Count & Char Count. I disabled both Plugins, but this didn't change anything.
Thoughts.
During the saving process, I merely cleanse the data via the $this->db->escape() function in CodeIgniter, which cannot to circumvented, or the data won't commit and I receive an error.
Just to be clear, during testing, the errors occured with any type of image object; either added manually, or via Uploadcare.
If anyone has any advice as to how I can coax CKEditor into handing images, I'd be happy for any advice.
This might be caused by
This might be caused by Advanced Content Filter. Try turning it off as explained here.
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Hi Seb, where would I make
Hi Seb, where would I make these changes? I can't see anywhere that explains where I'm meant to place rules; the documentation makes huge assumptions about how much I know.
Okay, in my view page, I have
Okay, in my view page, I have:
Which — according to the documentation — "will disable the filter (data will not be filtered, all features will be activated)."
However, it doesn't work and it's doing exactly the same as before; stripping out the style attribute by name and converting the HTML to their regular textual equivalents.
If I chose to define something specifically, that turns almost everything off, including the plugins, and — strangely enough — the very thing I've written a rule for:
So I have no idea what's going on.
I've also tried the advice in
I've also tried the advice in a thread where someone is experiencing exactly the same problem as me, but neither methods work, which leads me to believe this is a problem particular to the CKEditor itself, and not the treatment of data in and of itself.
I've tried a number of things
I've tried a number of things to cut the server and the framework out of the equation, and it makes no difference. As I explained, the style attribute name is being selectively removed, which neither the framework nor the database are doing, nor would they do unless I wrote something to specifically do that.
You've written a description
You've written a description of the problem, but it would be better if you could provide samples of the original code and how it's modified.
Your second point is quite strange, if the problem is really CKEditor you should be able to reproduce it in the demo page, if it works fine there, then that points to a problem with some customization that you have made and so no one else will be able to reproduce your problem.
I'm having to try something
I'm having to try something completely different, which I hope is going to circumvent all of this. So if a moderator wishes to close this thread, they may do so.