1 Reply Latest reply on Mar 22, 2016 2:32 AM by Loic.Aigon

    How to findout the current selected word parent xmlElement name.

    Jackkistens Level 1
      Hi All,

       

      How to findout the current selected word parent xmlElement name. In case parent Element name is "bold, italic, superscript and etc." need to fetch the bold element parent node name. please suggest me.


      Regards,

      Jack



      sample code is below:

      var myFoundItems = myDoc.findGrep();
                 
                  if(myFoundItems.length != 0){
                          var myFoundTags = new Array;
                          for(var myCounter = 0; myCounter<myFoundItems.length; myCounter++){
                             
                              alert(myFoundItems[myCounter].contents)
                              var findPara = myFoundItems[myCounter].texts[0].paragraphs;
                              alert (myFoundItems[myCounter].texts[0].paragraphs.length);
                              for(var j = 0; j < findPara.length; j++)
                              {
                                    var aidContent = findPara[j].lines[0].lines[0].texts[0].words[0].contents;
                                    alert (aidContent);
                                     var xx = findPara[j].lines[0].lines[0].texts[0].words[0].associatedXMLElements[0].;
                                    
                                    findPara[j].lines[0].lines[0].texts[0].words[0].associatedXMLElements[0].xmlAttributes.ad d("aid:pstyle","sssssssssssssss")
                                    //alert(findPara[j].lines[0].lines[0].texts[0].words[0].associatedXMLElements[0].xmlAttri butes.add("aid:pstyle","sssssssssssssss"))
                                 
                                  }