InDesign - .remove() styles default behaviour

Explorer ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

Hi InDesign scripters!
I am pretty new to ID scripting, but have lots of experience of CEP for Photoshop.
I have a query about the .remove() method for styles that I hope someone can shed a bit more light on than the documentation.
The .remove() method appears to preserve formatting by default, but I would like to confirm that this is actually the case as I can't find any explicit reference in the docs (both offical and Jongware).
My own tests seem to indicate that this is the case, but I'm not knowledgeable enough about ID to predict any edge cases where where the formatting might not be preserved upon executing .remove(), and I need a bit more confidence than "it just works"!

Thanks in advance!

TOPICS
Scripting

Views

60

Likes

translate

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

Adobe Community Professional , Feb 26, 2021 Feb 26, 2021
Yes, unless you add the replacing with parameter, the formatting is not changed. It would be the equivalent of selecting a paragraph and choosing Break Link to Style from the Paragraph Styles panel.

Likes

translate

Translate

Translate
Adobe Community Professional ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

Yes, unless you add the replacing with parameter, the formatting is not changed. It would be the equivalent of selecting a paragraph and choosing Break Link to Style from the Paragraph Styles panel.

Likes

translate

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 ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

Amazing, thanks for that Rob!

Likes

translate

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