2 Replies Latest reply on Jan 24, 2011 12:34 PM by lhanneman

    [CS5][JS] How to remove all content from TextFrame?




      I'm wondering what the best way to remove ALL CONTENT (i.e. text, graphics, etc) from a textframe? Previously, I've done it in a loop because of the overflow possibility:


      while(textframe.overflow == true){

           textframe.contents = "";



      This works fine if there is only text in the frame, but if there is a graphic or if some text is horizontal and some is vertical, it becomes an infinite loops because it can't remove the rest of the content.


      It seems like there  should be a better way to remove everything from a textframe, does anyone know of a way?


      Thanks in advance,