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

How to find a paragraph/character style is imported using javascript?

Participant ,
Jul 15, 2022 Jul 15, 2022

Copy link to clipboard

Copied

Hi Team,
How to find a paragraph/charcter styles is imported from another template using javascript.

 

Thanks

TOPICS
Scripting , SDK

Views

217

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 , Jul 26, 2022 Jul 26, 2022

Just a note:

I watched the value for styleUniqueId in a source document.

Then I loaded all the custom styles from the source to a new document.

 

All values of styleUniqueId are still intact.

The same if you load a style and overwrite an existing one using all incoming properties.

 

That will change in the moment when a style is renamed or changed otherwise[*].

Perhaps needless to say that if you rename the style back to its old name the styleUniqueId will not be restored, it will just get anoth

...

Votes

Translate

Translate
Community Expert ,
Jul 15, 2022 Jul 15, 2022

Copy link to clipboard

Copied

Hi @Balaji Murugesan ,

when you import/place a Word document the styles imported from that document show value true for property imported that comes with character styles and paragraph styles. But maybe this is not the thing you want to know?

 

Could you tell what you exactly mean with "another template".

 

Also look into property styleUniqueId for paragraph styles and character styles.

 

Regards,
Uwe Laubender
( Adobe Community Professional )

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
Guide ,
Jul 23, 2022 Jul 23, 2022

Copy link to clipboard

Copied

Probably Balaji means the import also available from the style panel fly-out, that would both modify existing styles and create new ones (as you say one could watch IDs for that).

I think scripting "using javascript" has no notification such as a matching document event, while plug-ins definitely can see all of that "import using javascript", styles getting added and/or modified.

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
Community Expert ,
Jul 26, 2022 Jul 26, 2022

Copy link to clipboard

Copied

Just a note:

I watched the value for styleUniqueId in a source document.

Then I loaded all the custom styles from the source to a new document.

 

All values of styleUniqueId are still intact.

The same if you load a style and overwrite an existing one using all incoming properties.

 

That will change in the moment when a style is renamed or changed otherwise[*].

Perhaps needless to say that if you rename the style back to its old name the styleUniqueId will not be restored, it will just get another id for the second change.

 

Also note that the value for styleUniqueId in the [No Paragraph Style] is always empty.

And that the value for property label of a style will persist if you load a style.

 

[*] Changing the value for property label will not change the value for styleUniqueId .

 

Regards,
Uwe Laubender
( Adobe Community Professional )

 

 

 

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
Participant ,
Jul 26, 2022 Jul 26, 2022

Copy link to clipboard

Copied

LATEST

Hi @Laubender  and @Dirk Becker, Thanks for your suggestion, feasibility studies will be done based on your suggestions and the status will be updated here as soon as possible.

Thanks
Balaji M

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