Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
igHtmlEditor disable images

Hi Infragistics,

Is there a way to disable inserting images into the rich text editor?
Even when the toolbar button is hidden users can still copy-paste or drag-and-drop images.

  • 1300
    Verified Answer
    Offline posted

    Hello Ben,

    After investigating this further, I have determined that when an image is being pasted on the htmlEditor the event could not be canceled, since the image is already in the editor.

    However, what I could suggest is binding a method to the paste event of the editor and checking if an image is being pasted. If yes, the image could be removed as follows:

    paste: function (evt, ui) {

                        setTimeout(() => {

                            let img = ui.owner.workspace.contentDocument.images[0];

                            let length = ui.owner.workspace.contentDocument.images.length;

                            if (img) {

                                for(let i = 0; i < length; i++) {




                        }, 0);


    Regarding the drag and drop in the igHtmlEditor, a method could be bound to the drop event of the contentDocument and could be canceled as below:


                . . .

                rendered: function (evt, ui) {


                          'drop': handleFileDrop,



    . . .

    function handleFileDrop(evt) {



    Please let me know if you need any further information regarding this matter.

    Monika Kirkova,