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

[Solved] OnClientPasteHtml - how do I use it correctly please?

2 Answers 104 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 2
Richard asked on 04 Sep 2009, 03:30 PM
I have the following code and it does not work, please can anyone help?

    <script type="text/javascript">  
        function test() {  
            alert("hello");  
        }  
    </script> 
 
        <telerik:RadEditor ID="RadEditor1" runat="server" OnClientPasteHtml="test">  
            <Content> 
            </Content> 
        </telerik:RadEditor> 

Thanks

2 Answers, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 2
answered on 04 Sep 2009, 03:48 PM
Actually, I figured out the problem is a bit more complicated.

It seems that the "test" function is fired when you right click on the editor and choose "Past as HTML".  It does not work when you right click and choose "Paste" or if you use the very common CTRL+V commands.


Can anyone please tell me how to ensure that "Paste" or CTRL+V fires the "test" function?  It is strange that there is no OnPaste !

Thanks

R
0
Richard
Top achievements
Rank 2
answered on 04 Sep 2009, 04:02 PM
Fixed this problem with OnClientExecutedCommand instead.

Have another problem but will post in new thread, sorry!
Tags
Editor
Asked by
Richard
Top achievements
Rank 2
Answers by
Richard
Top achievements
Rank 2
Share this question
or