6 Replies Latest reply on Nov 9, 2017 1:34 AM by yadavs92328

    How can i create paragraph or character style using javascript

    Learner X

      Hi all,


      I  have doubt in create a paragraph style or character style using javascript.


      This is the script i am using write now:


      app.findTextPreferences.findWhat = NothingEnum.nothing;

      app.changeTextPreferences.changeTo = NothingEnum.nothing;

      app.findTextPreferences.fontStyle = "Italic"

      app.changeTextPreferences.appliedCharacterStyle = "cs_italic";



      What the script is exactly doing is if the fontstyle is "Italic" means it automatically apply "cs_italic" style, which  i already  created in the character style pallette.


      But what i want is if the fontstyle is (Italic, Bold) means it automatically create a character style related to their fonts after that apply over their styles.


      I am new to forum and javascript.


      Thanks in advance.....