Block drag & drop image OR direct image paste into CKEditor

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
11/1/2014 11:05:04 AM
Gravatar
Total Posts 8

Block drag & drop image OR direct image paste into CKEditor

Hi

How to Block drag & drop image OR direct image paste into CKEditor in mojoportal?

11/1/2014 12:20:59 PM
Gravatar
Total Posts 18439

Re: Block drag & drop image OR direct image paste into CKEditor

why? for what reason?

only users who have been given file upload permission can upload images

it is possible to remove the mojofiledrop plugin, but if you are thinking it is for security reasons then you should re-consider who you are allowing to edit in content features. un-trusted users should not be given edit permissions on features like html content or blog, see what mojoportal is NOT designed for under our About page

11/2/2014 4:01:44 PM
Gravatar
Total Posts 8

Re: Block drag & drop image OR direct image paste into CKEditor

Hi

My intention is to disable the adds images from local client as base64 string.
base64 string causes database is very big. I want to force users add image with server side processing (create folder and upload image files).

How to disable adds images as  base64 string in CKeditor?

thanks

11/3/2014 1:03:31 PM
Gravatar
Total Posts 18439

Re: Block drag & drop image OR direct image paste into CKEditor

Hi,

That seems to be a "feature" of Firefox web browser, not really a feature of CKeditor. There is a 3rd part plugin that can make that happen in other browsers but we don't have that plugin included in mojoPortal, so it seems an issue limited to Firefox.

From googling about it I found a plugin that can block it, you would have to add the plugin below the plugins folder down under /CleintScript/ckeditorxxx/plugins

then you would have to add the plugin name in the config.extraPlugins

in /ClientScript/ckeditor-mojoconfig.js

or point to a custom file if you are worried about losing that change on upgrade.

I would think the easiest way to handle the problem with trusted users is tell them don't paste like that. Using drag and drop in mojoportal to add images to the editor should upload the file (unless you are using a very old version), only paste results in base64 and only in Firefox I think.

Hope that helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.