2 Replies Latest reply on Dec 9, 2011 6:23 AM by TᴀW

    Break link to Character Style with JS (CS4ME)

    TᴀW Adobe Community Professional & MVP

      Hi,

       

      I'm wondering how to break a link to a character style in JS. By break

      link I mean removing the character style but preserving the formatting.

       

      Given a selected textStyleRange, say, in the UI there are two ways of

      doing this. One is to click "Break link to Style" in the flyout meny of

      the character style palette.

       

      The other is to right-click and select "Apply character style."

      It's a little unintuitive, because CLICKING on removes overrides,

      but right-clicking and selecting the menu option doesn't.

       

      So when I saw that, I said to myself aha! Probably:

       

      myText.appliedCharacterStyle = myCharStyle

       

      is equivalent to clicking on , while

       

      myText.applyCharacterStyle(myCharStyle)

       

      is equivalent to right-clicking on and choosing "Apply character

      style."

       

      But it isn't.

       

      They both apply None and remove all formatting.

       

      So, anyone know how to break a link to character style without removing

      formatting in JS?

       

      Thanks,

      Ariel