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

Update Style of CharFmt

New Here ,
Jul 16, 2018 Jul 16, 2018

Copy link to clipboard

Copied

Hi All,

It is easily possible to change with Pod "Character Designer" a property of a character format.
For example, in a template file of a FM book, when a character style is selected, the change of one property, e.g. color, could be updated with "Update Style" button when the cursor position is not in a particular paragraph of a body page. Next action will be to either retain or remove overrides.

With javascript code it is possible to change as well color red of a character format to black.

var charfmt = doc.GetNamedCharFmt(varcol);

        // var chrfmt = doc.GetNamedObject(Constants.FO_ChrFmt, varcol);

        if (charfmt.ObjectValid() == true)

            {

                            charfmt.Color = "Black";

      }

But is it also possible to use a javascript function equivalent to "Update Style, "Retain Overrides" or "Remove Overrrides" buttons?

Marc

TOPICS
Scripting

Views

292

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 16, 2018 Jul 16, 2018

Copy link to clipboard

Copied

LATEST

You can use the following code to update all occurrences of the Character Format in the document and remove overrides:

doc.SimpleImportFormats (doc, Constants.FF_UFF_FONT | Constants.FF_UFF_REMOVE_EXCEPTIONS);

-Rick

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