Copy link to clipboard
Copied
Hello,
Maybe this one could go on in the general InDesign forum but as I am trying to achieve this by script, I thought I could get valuable inputs from you guys.
Do you think it's possible to set a zero width space as a bullet character for a paragraph style ?
If I try this to get character code, its failing :
app.selection[0].characters[0].contents .charCodeAt (0); //Error
Given that first and unique character is a zero width space. It works fine with a regular character. So it seems that as it is a special character, it doesn't have any code (except from enumeration) ?
I noticed unicode for zero width space is U+200B but I can't get to pass it as a value for the bulletChar.characterValue property.
Am I stuck in a deadend ?
best,
loic
I don't think the bullet characters will show up in the contents unless you convert them to text first.
It looks like these will work to supply a unicode ID number for the character you want:
paragraphStyle.bulletChar.characterValue = 0x200B;
or
paragraphStyle.bulletChar.characterValue = 8203;
Jeff
Copy link to clipboard
Copied
Hi Loic,
characterValue property accept the Glyph ID values too... try the approach.
Copy link to clipboard
Copied
Hi all and thank you for inputs,
@imagine > yes but zero width character seems to have the regular space glyph code. So problem is that in this case, I will end up with a regular space creating an indent in the beginning of the line. Unless I am wrong.
@absqua > Great !!! It works fine. I tried to set unicode value but the wrong way.
Thanks you again for all of you.
Loic
Copy link to clipboard
Copied
I don't think the bullet characters will show up in the contents unless you convert them to text first.
It looks like these will work to supply a unicode ID number for the character you want:
paragraphStyle.bulletChar.characterValue = 0x200B;
or
paragraphStyle.bulletChar.characterValue = 8203;
Jeff
Find more inspiration, events, and resources on the new Adobe Community
Explore Now