Disable image paste functionality in Kendo editor

3 posts, 0 answers
  1. Dekel
    Dekel avatar
    25 posts
    Member since:
    Jan 2015

    Posted 12 Aug 2015 Link to this post

    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,

  2. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 13 Aug 2015 Link to this post

    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.

    Regards,
    Alex Gyoshev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Dekel
    Dekel avatar
    25 posts
    Member since:
    Jan 2015

    Posted 13 Aug 2015 Link to this post

    Hi,

    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 = "";
    }
    }
    });

     

Back to Top