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

Clear Paragraph style linking

Contributor ,
Nov 20, 2017 Nov 20, 2017

Hi experts,

How to clear paragraph style linking in my selected text?

thanks

John

TOPICS
Scripting
736
Translate
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

Engaged , Nov 20, 2017 Nov 20, 2017

try:

app.selection[0].applyParagraphStyle(app.activeDocument.paragraphStyles[0],false);

(with some text selected. Or replace app.selection[0] with any text object)

applyParagraphStyle allows you to specify whether you want to clear overrides or not. The default is true but by using false you end up with [No paragraph style] applied but without changing the typographic properties.

Translate
Enthusiast ,
Nov 20, 2017 Nov 20, 2017

Could you be more specific?

Translate
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
Contributor ,
Nov 20, 2017 Nov 20, 2017

Hi,

If my selected text applied to paragraph style = "XXXXX". I need a script to cancel the text linking to paragraph style.

after run the text will applied to none of paragraph style.

thanks

John

Translate
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
Enthusiast ,
Nov 20, 2017 Nov 20, 2017

Try app.selection.appliedParagraphStyle =

app.activeDocument.paragraphStyles[0];

Translate
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
Contributor ,
Nov 20, 2017 Nov 20, 2017

Thank you so much,

but after run, it change the font size and font style.

can it keep all and just cancel paragraph style linking.

John

Translate
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
Engaged ,
Nov 20, 2017 Nov 20, 2017

try:

app.selection[0].applyParagraphStyle(app.activeDocument.paragraphStyles[0],false);

(with some text selected. Or replace app.selection[0] with any text object)

applyParagraphStyle allows you to specify whether you want to clear overrides or not. The default is true but by using false you end up with [No paragraph style] applied but without changing the typographic properties.

Translate
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
Contributor ,
Nov 20, 2017 Nov 20, 2017
LATEST

great, thank you all guys

thank so much.

John

Translate
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