Thank you for your question.
The Editor does not support this functionality out-of-the-box and a custom implementation will be required to achieve the desired behavior.
The following article in our online demo shows how a similar to the requested functionality can be accomplished by attaching to the OnClientPasteHtml
event of the Editor: Editor - OnClientPasteHtml
In your scenario, by checking if the MediaManager command has fired the event, you will be able to get the HTML that would be pasted into the editor and edit it. You can, for example, capture the src
attribute of the embed element (which would point to the uploaded file) and prepare an anchor tag with the same value for its href attribute. Finally, by firing args.set_value(div.innerHTML)
, you can paste into the editor the custom-made link.
I hope that you will find the provided information helpful. Should you have any other questions, do not hesitate to contact us.
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed