Skip to main content
Loic.Aigon
Brainiac
November 29, 2011
Answered

Setting zero width space as bullet character for paragraphStyle

  • November 29, 2011
  • 2 replies
  • 1415 views

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

This topic has been closed for replies.
Correct answer absqua

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

2 replies

absquaCorrect answer
Inspiring
November 29, 2011

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

கற_பன___Imagine_
Inspiring
November 29, 2011

Hi Loic,

characterValue property accept the Glyph ID values too... try the approach.

Loic.Aigon
Brainiac
November 29, 2011

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