All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
Hi,
When I paste image to the kendo editor it inserted as base64 image tag.
After that I am sending the content of the editor by mail, since many email clients blocking base64 images.
I want to disable this functionality in my project.
Please let me know how I can do it.
Thanks,
Hello Dekel,
You can post-process the editor content, as shown in this how-to help topic, or remove the image tags on the server, prior to sending the e-mail.
Found better solution (override paste event on kendo editor):
$("#MailBody").kendoEditor({ resizable: { content: true, toolbar: true }, paste: function (e) { if ((/^<img src="data:image/).test(e.html)) { e.html = ""; } } });
Hi Dekel
This workaround was very helpful, I restricted my editor to all type of images, something like this:
function OnPaste(e) { if ((/^<img src="/).test(e.html)) { alert("Images are not allowed in this field"); e.html = ""; } }