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

[Solved] Fire JS after OnClientSelectionChange - node inspector

1 Answer 117 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Brian Garson
Top achievements
Rank 2
Brian Garson asked on 10 Dec 2009, 08:03 PM
Hello,

was wondering if someone could point me in the right direction, I'm looking to fire some custom Javascript after the client has made a selection change in the editor AND after the node Inspector has loaded.  For example when a user clicks on an image, the nodeInspector is loaded in the bottom docking zone.  Once the inspector has loaded, I would like to have a script run, is this possible?

thanks,

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 14 Dec 2009, 06:23 PM
Hello Brian,

You can run a small timeout after the OnClientSelectionChange execution as it is shown below:

<script type="text/javascript">
function OnClientSelectionChange(editor, args)
{
   setTimeout(function()
   {

           alert("selection changed" + editor.getSelectionHtml());
   }, 1000);
}
</script>
<telerik:radeditor runat="server" ID="RadEditor1"
    OnClientSelectionChange="OnClientSelectionChange">
    <Content>
         <strong>Sample Content</strong>
    </Content>
</telerik:radeditor>

 This will ensure that the module is updated.


Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Editor
Asked by
Brian Garson
Top achievements
Rank 2
Answers by
Rumen
Telerik team
Share this question
or