3 Replies Latest reply on Sep 20, 2015 7:24 PM by CoverBuilder

    Sort character styles by name

    CoverBuilder Level 1

      Hey guys,

       

      Does anyone know how I can sort the paragraph styles of a document by name using Javascript?

      (The same as choosing 'Sort by Name' in the paragraph style fly-out menu)

      app.activeDocument.characterStyles.keys(list).sort(function(a,b){return list[a]-list[b]});

       

      Thanks,

       

      Bruno