Copy link to clipboard
Copied
Hi there,
i am trying to get a certain unicode id of "003E". i cannot find out how to add this to a paragraph style i am creating. Also the color of the bullet. Any help will be appreciated!
var myDoc = app.activeDocument;
var text = "Poppins";
var bold = "Bold";
var regular = "Regular";
var bulletType = "003E";
bulletList = myDoc.paragraphStyles.add(
{
name : 'Main Bullets',
appliedFont : text,
fontStyle : regular,
pointSize : 12,
bulletsAndNumberingListType : ListType.BULLET_LIST,
bulletsAndNumberingSize : 14,
bulletsCharacterStyle : bold,
bulletsandNumberingColor : "Red"
}
);
bulletList.tabStops.add(
{
position : "0p18"
}
);
1 Correct answer
Hi @kyleo94921011,
Try the following
var text = "Poppins";
var bold = "Bold";
var regular = "Regular";
var bulletType = "003E";
bulletList = myDoc.paragraphStyles.add(
{
name : 'Main Bullets',
appliedFont : text,
fontStyle : regular,
pointSize : 12,
bulletsAndNumberingListType : ListType.BULLET_LIST,
bulletsAndNumberingSize : 14,
bulletsCharacterStyle : bold,
bulletsandNumberingColor : "Red"
}
);
bulletList.bulletChar.characterType = BulletCharacterType.UNI
...
Copy link to clipboard
Copied
[Moderator moved from Coding Corner to InDesign.]
Copy link to clipboard
Copied
Hi @kyleo94921011,
Try the following
var text = "Poppins";
var bold = "Bold";
var regular = "Regular";
var bulletType = "003E";
bulletList = myDoc.paragraphStyles.add(
{
name : 'Main Bullets',
appliedFont : text,
fontStyle : regular,
pointSize : 12,
bulletsAndNumberingListType : ListType.BULLET_LIST,
bulletsAndNumberingSize : 14,
bulletsCharacterStyle : bold,
bulletsandNumberingColor : "Red"
}
);
bulletList.bulletChar.characterType = BulletCharacterType.UNICODE_ONLY
bulletList.bulletChar.characterValue = 0x003e
bulletList.tabStops.add(
{
position : "0p18"
}
);
-Manan
Copy link to clipboard
Copied
Hi.
I ran the code, and the addition of the burette worked fine.
The color is specified by setting the bulletCharacterStyle property.
So you need a predefined characterStyle to use for that.
Copy link to clipboard
Copied
awesome thank you guys for all the help!
Copy link to clipboard
Copied
The complete list of properties that can be accessed for bullet can be looked at the following link
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Bullet.html
-Manan

