Ability to intercept event when switching between Normal, HTML and Preview tabs

Last post 09-28-2005, 1:50 PM by fishoutawata. 2 replies.
Sort Posts: Previous Next
  •  09-28-2005, 11:29 AM 11125

    Ability to intercept event when switching between Normal, HTML and Preview tabs

    I there a javascript event I can intercept when I user switches between the three tabs at the bottom of the editor (Normal, HTML, Preview)?  If this is possible a simple example would be appreciated.  
  •  09-28-2005, 1:02 PM 11138 in reply to 11125

    Re: Ability to intercept event when switching between Normal, HTML and Preview tabs

    It's possible.
     
    Please use the following code as an example:
     
     function CE_attachEvent()
       {
        // get the cute editor instance
        var editor1 = document.getElementById('<%=Editor1.ClientID%>');
        var images=editor1.all.tags("IMG");
        var len=images.length;
        for(var i=0;i<len;i++)
        {
         var img=images[ i ];
         if(img.Command=="TabCode")
         if(img.attachEvent)
          img.attachEvent('onclick',HandleChange);
        }
       }   
       ;" if(img.Command='="TabCode")'>
     
    function HandleChange()
       {
        // get the cute editor instance
        var editor1 = document.getElementById('<%=Editor1.ClientID%>');
        //Get the editor content 
        var editdoc=editor1.GetDocument();
        alert(editdoc.body.innerHTML);
       } 
     

     <INPUT type=button value="attach Event (onkeypress)" onclick="CE_attachEvent()">
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  09-28-2005, 1:50 PM 11144 in reply to 11138

    Re: Ability to intercept event when switching between Normal, HTML and Preview tabs

    Adam,

    Thank you so much for your quick reply and your example code!
View as RSS news feed in XML