Copy link to clipboard
Copied
Hi,
I want to export the unicode value of bullets in paragraph styles.
I can get some kind of value by
paragraphstyle.bulletChar.characterValue
even though the charactertype is UNICODE_ONLY it's no unicode, it might be the glyph id, but I'm not sure about that.
However, is there a way to get the unicode value of the bullet?
Thanks in advance
Copy link to clipboard
Copied
Use String.fromCharCode() to convert a unicode code point (number) to the matching character:
String.fromCharCode(app.activeDocument.paragraphStyles.lastItem().bulletChar.characterValue)
Dirk
Copy link to clipboard
Copied
Thanks for your answer.
This is really helpful, however, I want to write the bullet-character into an html-file so therefore I was hoping to get some kind of Notation or Code for special characters such as:
•
or •
instead of the actual character (•).
Is that even possible?
Copy link to clipboard
Copied
I don't understand your problem.
If you really intend to reinvent the existing export for XHTML (also known as "Export for Dreamweaver"), you'd either use the numeric values within an entity reference, as you already have them, or look up the translation, or specify an appropriate charset in the Content-Type meta data matching your file encoding. But all of that has nothing to do with InDesign, instead you need a basic knowledge of web standards.
Dirk
Find more inspiration, events, and resources on the new Adobe Community
Explore Now