Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
502
Edit node text on client side
posted

Hello

I would like to be able to change the text before editing it on the client side

 

the text of my node is

 

mynodeText (0)  

 

when I double click now, I get "mynodeText (0)" in the textbox

I would like to get "mynodeText" only.

I saw the js function which is called on node edit ...

first problem ...

function uwTree_BeforeBeginNodeEdit(treeId, nodeId){
   
   
    igtree_getNodeById(nodeId).getTag();

   igtree_getNodeById(nodeId).getText();
   

   
}

 

why   igtree_getNodeById(nodeId).getTag(); works

and igtree_getNodeById(nodeId).getText(); generate en error in your getText function ... parentNode error ?

 

Second , How can I set the textbox with the text I want , here "mynodeText"

 

Thx in advance

 

GillouX 

  

Parents
  • 502
    posted

     The first problem is solved

    function uwTree_BeforeEndNodeEdit(treeId, nodeId, newValue){
        //Add code to handle your event here.
        alert(igtree_getNodeById(nodeId).getText());
       
    }

    getText works correcty in the  BeforeEndNodeEdit

     

Reply Children