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

OnClientPasteHtml event not firing from SetImageProperties

5 Answers 77 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Matt Liszewski
Top achievements
Rank 1
Matt Liszewski asked on 11 Feb 2010, 08:23 PM
I need to inspect the html returned from the ImageProperties dialog. I am attempting to use the OnClientPasteHtml function to handle this but it is not getting fired when I use the dialog. The html is beign updated but the event doesn't get fired. It is getting fired properly form the ImageManager,Hyperlink dialog,etc. but not the ImageProperties dialog.

function OnClientPasteHtml(editor, args)  
{  
    alert(args.get_commandName());  
}  
 
   <telerik:RadEditor ID="HtmlContent" runat="server" Width="100%" Height="350px" EditModes="Design, Html" OnClientPasteHtml="OnClientPasteHtml" 
        ToolsFile="/Portal/config/ToolsFile.xml" ContentFilters="IndentHTMLContent" AutoResizeHeight="false" 
        StripAbsoluteImagesPaths="true" Skin="WebBlue">  
        <ImageManager EnableImageEditor="false" /> 
         
    </telerik:RadEditor> 

5 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 16 Feb 2010, 12:40 PM
Hi Matt,

OnClientPasteHtml event is not fired because by design SetImageProperties dialog does not execute PasteHtml but just modifies an existing image's attributes using browser's RichText editing engine. This behavior is logged in our ToDo list and we will do our best to fix it for one of our upcoming releases.


Regards,
Dobromir
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
Matt Liszewski
Top achievements
Rank 1
answered on 16 Feb 2010, 12:51 PM
Is there any event that will get fired when the dialog is closed then?
0
Rumen
Telerik team
answered on 18 Feb 2010, 10:51 AM
Hi Matt,

You can easily modify the image object inserted via the Set Image Properties dialog by registering the external dialogs of RadEditor. After that open the EditorDialogs\SetImageProperties.ascx, locate the getModifiedImage function and modify the resultImage object, e.g.

...
resultImage.customAttribute = "shalalalala";
return resultImage;

You can also paste content by firing the pasteHtml method

this._editor.pasteHtml("new content");

Best regards,
Rumen
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
Alain
Top achievements
Rank 1
answered on 18 Jun 2012, 04:11 PM
System: ASP.NET AJAX 2012.2.607

Hello,

Any news for fixing the OnClientPasteHtml not fired by SetImageProperties?
Any workarounds?

Best regards,
Alain
0
Rumen
Telerik team
answered on 20 Jun 2012, 01:36 PM
Hello,

You can try the solution provided by Dobromir in this forum thread: http://www.telerik.com/community/forums/aspnet-ajax/editor/onclientpastehtml-event-not-firing-from-setimageproperties.aspx#1092800.

Regards,
Rumen
the Telerik team
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 their blog feed now.
Tags
Editor
Asked by
Matt Liszewski
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Matt Liszewski
Top achievements
Rank 1
Rumen
Telerik team
Alain
Top achievements
Rank 1
Share this question
or