OnClientPasteHtml event not firing from SetImageProperties

6 posts, 0 answers
  1. Matt Liszewski
    Matt Liszewski avatar
    2 posts
    Member since:
    Jun 2006

    Posted 11 Feb 2010 Link to this post

    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> 
  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 16 Feb 2010 Link to this post

    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.
  3. Matt Liszewski
    Matt Liszewski avatar
    2 posts
    Member since:
    Jun 2006

    Posted 16 Feb 2010 Link to this post

    Is there any event that will get fired when the dialog is closed then?
  4. Rumen
    Admin
    Rumen avatar
    14459 posts

    Posted 18 Feb 2010 Link to this post

    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.
  5. Alain
    Alain avatar
    33 posts
    Member since:
    Feb 2009

    Posted 18 Jun 2012 Link to this post

    System: ASP.NET AJAX 2012.2.607

    Hello,

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

    Best regards,
    Alain
  6. Rumen
    Admin
    Rumen avatar
    14459 posts

    Posted 20 Jun 2012 Link to this post

    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.
Back to Top