This is a migrated thread and some comments may be shown as answers.

[Solved] InsertImage - replace default functionality

2 Answers 110 Views
Editor
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Andrej Kaurin
Top achievements
Rank 1
Andrej Kaurin asked on 29 Sep 2010, 06:45 PM
I need to replace default window with custom one when InsertImage is pressed. Is this possible?

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 30 Sep 2010, 07:28 AM
Hi kaan,

 Yes, this is possible. You can subscribe to the OnLoad client side event and attach a click handler to the image button:

    function onLoad() {
        $(this).find('.t-insertImage').click(function(e) {
            e.preventDefault();
            e.stopPropagation();

            //your code here
        });
    }

You can check the Custom Tools example which shows how to open a dialog and modify the window contents.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kevin
Top achievements
Rank 1
answered on 31 Mar 2011, 02:39 PM
//Your code here...


How do I get a reference to the editor that contains the image button?

let's say I have 5 editors on the page and I put this function on my page.  All 5 editors are going to now have their insert image functionality replaced with this function .  However, I need to execute similiar functionality to what is already in place.  I just want to be able to edit/maintain the pages/images/etc from a pop-up.

So, basically, i'm asking:  Can you provide or point me in the right direction to mimic the current functionality of the insert image or insert html link but with all "new"code?  (i.e. provide a copy of the existing code so that I can edit parts of it.

Or point me in the right direction. 

Thanks
Tags
Editor
Asked by
Andrej Kaurin
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Kevin
Top achievements
Rank 1
Share this question
or