I have an existing web application that i'm injecting the RAD Editor into. I have custom file browse and link tools (popups) that i need to use. how do i get them to interact with the editor? I've added a custom button to the tool bar but not sure how to update a link or image in the content.
1 Answer, 1 is accepted
0
Valeri Hristov
Telerik team
answered on 19 Oct 2007, 03:29 PM
Hello nyhtal,
It should be relatively easy to hook your existing popup with RadEditor Prometheus. I suppose that your popup is executing a callback function when it is closed, or raises a client-side event (which is the same actually). In this function you need to invoke RadEditor's pasteHtml() method, something like this excerpt from RadEditor's source code: this.LinkManager = function(commandName, editor, oTool) { var argument = Telerik.Web.UI.Editor.CommandList._getLinkArgument(editor); var callbackFunction = function(sender, args) { editor.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.realLink), commandName); }; editor.showDialog("LinkManager", argument, callbackFunction); return false; };
commandName is a string, which is used in the undo history to show the user friendly command name. Here is the link to the online help article for pasteHtml() (which appears to be missing the info for the second parameter...) http://www.telerik.com/help/radcontrols/prometheus/?pasteHtml.html