Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
One last small bug, everything else is working like a charm, though.

I've noticed when I try to post an image in the forms I've created using databound objects that the richtext editor is stripping out any trace of an image being inserted. It doesn't matter where the image comes from, locally on the server or from a different web site.

For instance, if I click on the image object in the CKEditor, it brings up the image dialogue for URL, size, alignment, etc. I paste in the intended image's URL, and click save. It shows up in the editor and all seems well. I can even check source and verify that it is there. As soon as I click submit and check the content, it's like it was never there. If I go to edit the page in either my edit screen or the Couch Admin Edit for that particular page, there is no trace.

I have no problem adding images using the Couch admin panel, however. It sticks around just fine. But as soon as I use my editing screen, it disappears from the richtext editor, no trace.

I've looked over the richtext documentation to see if it had something to do with a parameter to allow images, but I'm not seeing it.

What can I do to remedy this?
Hi,

That is actually by design. Front-end submissions allow only a limited subset of HTML tags and IMG is not in that list (we are supposed to use 'securefile' for uploading images from the frontend).

If you are willing to trust your users, try adding trust_mode='1' to the richtext editable region's definition (don't forget to refresh the template as super-admin).

Hope this helps.
KK wrote: Hi,

That is actually by design. Front-end submissions allow only a limited subset of HTML tags and IMG is not in that list (we are supposed to use 'securefile' for uploading images from the frontend).

If you are willing to trust your users, try adding trust_mode='1' to the richtext editable region's definition (don't forget to refresh the template as super-admin).

Hope this helps.


Yep, i'm willing to trust them, user registration is password protected so only a few people can access it to make accounts. And the users are a very limited amount of people that are meant to add content to the site (and their specific section).
The trust mode didn't do much for anything. It's still stripping images out of the input regardless if they are from the website or from anywhere else on the web.

Are there any modifications I can make to any couch config files that absolutely stops the tag stripping from happening? It's very important that members have the ability to add images to their content, especially for events where advertising banners will be displayed or sports section submissions where pictures will be necessary of game/matches.
My bad :(

I just noticed I had asked you add trust_mode='1' to the richtext editable region's definition.
It actually should go in the front-end form - with the cms:input bound to the region.

For example if 'my_richtext' is an editable region and is being represented on the front-end by a cms:input as follows
<cms:input name='my_richtext' type='bound' />

please make it
<cms:input name='my_richtext' type='bound' trust_mode='1' />

It should work.
Do let me know.

Thanks.
KK wrote: My bad :(

I just noticed I had asked you add trust_mode='1' to the richtext editable region's definition.
It actually should go in the front-end form - with the cms:input bound to the region.

For example if 'my_richtext' is an editable region and is being represented on the front-end by a cms:input as follows
<cms:input name='my_richtext' type='bound' />

please make it
<cms:input name='my_richtext' type='bound' trust_mode='1' />

It should work.
Do let me know.

Thanks.


AHA! Perfect!!!

Now all I've got left is to integrate ckfinder into the ckeditor. I may have some questions about how couch configures it, I've done some reading on ckeditor and ckfinder using CK's website, and it requires changes to the config.js file, so I'll get back to you if I have any questions. Thanks so much!!

EDIT : Okay, so following cdeditor's instructions on activating the file upload option inside of the add image/edit image function in ckeditor I have got it to the point where it's displaying the browse server button.

However, small problem. The browse server button is still trying to bring up the fileuploader that comes stock with couch.

The reason I'm trying to integrate KCFinder into the CKeditor is because fileuploader doesn't work and returns an XML error if I am not logged in as super admin. So basically my site staff/members won't be able to upload images using the fileuploader. This is fine, I'm sure it's a session authentication for couch and I don't want to mess anything up.

I'm just wondering if there is a way to point the browse server button that auto appears once I change the config.js file to my custom kcfinder instance.

Here is the code I added to config.js inside of couch/includes/ckeditor

Code: Select all
CKEDITOR.editorConfig = function(config) {
// ...
   config.filebrowserBrowseUrl = 'http://www.xyz.com/kcfinder/browse.php?opener=ckeditor&type=files';
   config.filebrowserImageBrowseUrl = 'http://www.xyz.com/kcfinder/browse.php?opener=ckeditor&type=images';
   config.filebrowserFlashBrowseUrl = 'http://www.xyz.com/kcfinder/browse.php?opener=ckeditor&type=flash';
   config.filebrowserUploadUrl = 'http://www.xyz.com/kcfinder/upload.php?opener=ckeditor&type=files';
   config.filebrowserImageUploadUrl = 'http://www.xyz.com/kcfinder/upload.php?opener=ckeditor&type=images';
   config.filebrowserFlashUploadUrl = 'http://www.xyz.com/kcfinder/upload.php?opener=ckeditor&type=flash';
// ...
};


Just to note, the uploads tab also auto-activated, and it seems to be working like a charm with the Send File to server function and auto inserts the image into the file url field on the first tab of the image properties dialogue.

So for now I can simply tell users not to use the "Browse Server" option and use the upload tab, but it would be nice if it worked both ways.
6 posts Page 1 of 1