• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Insert a class name with the style name

Explorer ,
Apr 09, 2021 Apr 09, 2021

Copy link to clipboard

Copied

Hi!

 

I'm trying to change the classes of all my styles using the names os styles itself in the Export Tag options to export to HTML but is not working. I know by default Indesign use the name of the style in the class, but I have styles inside groups and I dont want the name of the group in my html class. This is the code that I'm trying to do. I need to do this in characters and objects too.

 

var doc = app.activeDocument;

for (var i = 0; i < doc.allParagraphStyles.length; i++) {
var className = doc.allParagraphStyles[i].name;
doc.allParagraphStyles[i].styleExportTagMaps.add({exportType: "EPUB", exportTag: "", exportClass: className, exportAttributes: ""});
}

TOPICS
Scripting

Views

94

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation