Skip to main content
Bedazzled532
Inspiring
July 14, 2024
Answered

Dictionary Setting for Double and Single Quotes

  • July 14, 2024
  • 1 reply
  • 358 views

Hi

I want to change the Double and Single quotes to Typographer's quote using Extendscript. (I have attached a screenshot).

 

How can I set this preference using extendscript. I could not find anything in app.dictionaryPreference which controls quotes settings.

Thanks

This topic has been closed for replies.
Correct answer Bedazzled532

Ok,

I found help in another group. Posting here so that it can be useful for others.

 

var myDoc = app.activeDocument;
const DOUBLE_QUOTES = '“”';
const SINGLE_QUOTES = '‘’';

//Enable Typographer's Quotes
myDoc.textPreferences.typographersQuotes = true;

//Change the Language settings
myDoc.languages.everyItem().doubleQuotes = DOUBLE_QUOTES;
myDoc.languages.everyItem().singleQuotes = SINGLE_QUOTES;

1 reply

Bedazzled532
Inspiring
July 14, 2024

Ok, I found the setting to change Typographer's quotes but how to set Double and Single quotes of my choice as in screenshot. Thanks.

 

//To enable and disable Typographer's quotes

activeDocument.textPreferences.typographersQuotes = true;

Bedazzled532
Bedazzled532AuthorCorrect answer
Inspiring
July 16, 2024

Ok,

I found help in another group. Posting here so that it can be useful for others.

 

var myDoc = app.activeDocument;
const DOUBLE_QUOTES = '“”';
const SINGLE_QUOTES = '‘’';

//Enable Typographer's Quotes
myDoc.textPreferences.typographersQuotes = true;

//Change the Language settings
myDoc.languages.everyItem().doubleQuotes = DOUBLE_QUOTES;
myDoc.languages.everyItem().singleQuotes = SINGLE_QUOTES;