9 Replies Latest reply on Jun 19, 2008 2:11 AM by (Ariel_Walden)

    Applying None not removing Italics JS CS2

    Level 1
      Hello,

      I hope someone can help me. I've got a little script going that does the
      following. You place your cursor in any text. Run the script, and if the
      text has an "Italics" character style applied, the script will apply
      "[None]" instead to the entire run of text that has that style (like
      textStyleRange, except that I'm not actually using that.)

      The script works fine, and [None] char. style is duly applied to correct run
      of text. However, the formatting IS NOT being removed. When I do this
      through the UI (ie., manually select the text, and then click on None in the
      char. style pallette), it does remove the formatting. The line of script I'm
      using is:

      mystory.insertionPoints.itemByRange(myStart, myEnd).texts[0].applyStyle
      (mydoc.characterStyles.item ("[None]",true));

      So even though I add the "true" parameter to the method, I'm not getting the
      override I would like.

      Please help if you can.

      Thanks,
      Ariel