Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
1.9k views
in Plugins by

few months ago, when qa1.63 was the latest stable version of qa, I needed a professional image uploader plugin for ckEditor(wysiwyg editor) so I paid a developer to create that for me( but for the qa16.3 which was the stable one. Now after the qa1.7 the plugin no longer works! It uploads the images in the correct directory but the html img link has broken ref!

Apparently some stuff changed in ckEditor of qa 1.7 which is no longer compatible with qa 1.63!

Same issue is reported by another member here

http://www.question2answer.org/qa/42906/broken-images-issue-in-this-site

My question from Scott is that will there be an official fix for this?

For people like me, limited budget, paying for a plugin and seeing it only working for 2-3 months and not working with new releases of qa 1.7 is not very preferred

Q2A version: qa 1.7
by
1.7 stable... That's a joke right?
by
@Funrunna where are all your bug reports?

2 Answers

+1 vote
by
 
Best answer

Found it finally!

Thanks to Scott for the tips and the solution proved it to me that the upgrade to the ckEditor plugin of qa1.7 had notthing to with the issue. The issue was the new allowedContent introduced in the ckEditor 4.1 and up

Turns out that the ckeditor() checks that only elements which are in the 'allowedContent' list are possible.

Solution:

we need to add:

"    extraAllowedContent: 'img[!src,alt,width,height]',",

to qa-wysiwyg-editor.php

i.e.

                // Prevent config file being loaded
                "    customConfig: '',",
                "    extraPlugins: 'YOURPLUGIN',",
                "    extraAllowedContent: 'img[!src,alt,width,height]',",

 

IMHO:    extraAllowedContent: 'img[!src,alt,width,height]',",has to be embeded into the wysiwyg plugin

 

more info:

http://docs.ckeditor.com/#!/guide/dev_allowed_content_rules

http://stackoverflow.com/questions/17505757/how-to-allow-img-tag

by
Glad you found the issue. Still seems a bit odd to me because there are image/link buttons included in CKeditor that are able to bypass the filter...
+1 vote
by

Where does your plugin upload the files to, and what is the file path that it puts in the HTML?

The new CKeditor is now placed in a subdirectory so I'm sure it will just be a case of replacing "plugins/yourplugin/images" with "ckeditor/plugins/yourplugin/images" somewhere in the code.

by
No, still not working!

Here is what I did:

// Prevent config file being loaded
                "    customConfig: '',",
                "    extraPlugins: 'multipleImageUpload',",
                "    extraAllowedContent: 'a img',",
                "};",
by
This link is updated with the line above:
http://brglow.com/qa17ckEditorNew/index.php?qa=ask
by
Hold on! I guess I am getting somewhere Scott, i will updates you in few minutes
by
Scott! thank you for your time and helpful tips. I posted the answer here

http://www.question2answer.org/qa/43027/many-wysiwyg-ckeditor-plugins-no-longer-compatible-with-qa?show=43135#a43135

you might wanna consider adding the extraAllowedContent: 'img[!src,alt,width,height]',", to the core
...