157
Views
3
Comments
Solved
[CKEditor] Disabling pasting image to CK Editor
Question
ckeditor
Web icon
Forge asset by CKEditor Team

Hi everyone, I'm trying to disable the function of pasting images into the CKeditor. Is there any way to do it?

Thanks before

UserImage.jpg
Prasad Rao
Solution

Hi,

If you just want to disable the paste then you can listen to paste event, change the html and remove the img tag. or remove the image and imageupload plugin by passing 

removePlugins: ['image', 'uploadimage']

Regards.

2019-12-03 06-37-55
Jonathan Djuwandi

Thank you Prasad, it works. However, I'm still trying to disable the drag image event and came up to this link: https://stackoverflow.com/questions/6582559/ckeditor-preventing-users-from-pasting-images 

I've tried to follow the instructions by creating a new plugin.js file and editing the config.js file, but it doesn't seem to work. Did I miss something in the process of adding a new js plugin file?

Thanks in advance.

Best regards,

Jonathan

UserImage.jpg
Prasad Rao

Hi,

You are trying to clone the ckeditor and will miss out on any update we make. Better approach is to extend is using you own custom config.js and plugin.js in your module. If you download the latest demo app of the ckeditor, you will find the same example.

Regards.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.