Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Insert a class name with the style name

Community Beginner ,
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

42

Likes

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