Re: Adding code snippets in JavaScirpt

  •  12-06-2013, 8:09 AM

    Re: Adding code snippets in JavaScirpt

    Hi frJericho,

     

    Can you explain your requirement in detail? The treeview is one of the editor toolbar item? Or is the html content what you are editing in editor?

     

    If is second one, you can get the editor edit area document, once you get the editor document, you can use the normal javascript method to get any element of the document. It has the same functions as the html dom.

     

    1. Getting the Active Editor Document  
    2. In order to find the active editor document, you would type:  
    3. // get the active editor document  
    4. var editor1 = document.getElementById('<%= Editor1.ClientID%>').editor;  
    5. var editwin = editor1.GetWindow();  
    6. var editdoc = editwin.document;  
     

     

    Regards,

     

    Ken 

View Complete Thread