• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Add automatically glyph before hyperlinks character style

Explorer ,
Apr 20, 2020 Apr 20, 2020

Copy link to clipboard

Copied

Hi everybody, it's my fist post 😉 
I try to add automatically glyph before all my hyperlinks do you know I could I do this ?

Thanks for your answers

TOPICS
How to , Scripting

Views

453

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

correct answers 1 Correct answer

Community Expert , Apr 20, 2020 Apr 20, 2020

This should do it. It inserts the Pilcrow (U+00B6) at the start of each link; change to any other glyph you want.

 

var hpl = app.documents[0].hyperlinks;  
for (var i=0; i<hpl.length; i++)
{
	urlText = hpl[i].source.sourceText;
	urlText.insertionPoints[0].contents = '\u00B6'
}

 

 

Votes

Translate

Translate
Community Expert ,
Apr 20, 2020 Apr 20, 2020

Copy link to clipboard

Copied

This should do it. It inserts the Pilcrow (U+00B6) at the start of each link; change to any other glyph you want.

 

var hpl = app.documents[0].hyperlinks;  
for (var i=0; i<hpl.length; i++)
{
	urlText = hpl[i].source.sourceText;
	urlText.insertionPoints[0].contents = '\u00B6'
}

 

 

Votes

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
Explorer ,
Apr 20, 2020 Apr 20, 2020

Copy link to clipboard

Copied

LATEST

thanks i'll try it

Votes

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