Product Bundles
DevCraft
All Telerik .NET and Kendo UI JavaScript components and AI Tools in one package.
Kendo UI
Bundle of AI Tools plus four JavaScript UI libraries built natively for jQuery, Angular, React and Vue.
Build JavaScript UI
Javascript
Telerik
Build modern .NET business apps
.Net Web
Cross-Platform
Desktop
Reporting and Documents
AI for Developers & IT
Ensure AI program success
AI Coding
AI Engineering
Additional Tools
Enhance the developer and designer experience
Testing & Mocking
Debugging
UI/UX Tools
CMS
Free Tools
Support and Learning
Productivity and Design Tools
I want to use the Radeditor to edit HTML data. However, I have a special image editor that I want to execute when the user double clicks on certain images in the document. Is this possible with Radeditor? Can I execute Javascript in the editor?
Thanks,
Arthur
Hi Arthur,
You can see how to attach to the ondblclick event of the iframe-based content area of RadEditor in this article: Open Link in a New Window on Double Click, e.g.
<script type="text/javascript"> function OnClientLoad(editor, args) { editor.attachEventHandler("ondblclick", function (e) { var sel = editor.getSelection().getParentElement(); //get the currently selected element var href = null; if (sel.tagName.toLowerCase() == "img") { alert("do something with the selected image"); return false; } } ); } </script> <telerik:RadEditor runat="server" ID="RadEditor1" OnClientLoad="OnClientLoad"> <Content> Sample Content <img src="https://docs.telerik.com/devtools/aspnet-ajax/assets/Avatar-Ninja-big.svg" /> Sample Content </Content> </telerik:RadEditor>
Hi Arthur,
You can see how to attach to the ondblclick event of the iframe-based content area of RadEditor in this article: Open Link in a New Window on Double Click, e.g.
<script type="text/javascript"> function OnClientLoad(editor, args) { editor.attachEventHandler("ondblclick", function (e) { var sel = editor.getSelection().getParentElement(); //get the currently selected element var href = null; if (sel.tagName.toLowerCase() == "img") { alert("do something with the selected image"); return false; } } ); } </script> <telerik:RadEditor runat="server" ID="RadEditor1" OnClientLoad="OnClientLoad"> <Content> Sample Content <img src="https://docs.telerik.com/devtools/aspnet-ajax/assets/Avatar-Ninja-big.svg" /> Sample Content </Content> </telerik:RadEditor>