5 Replies Latest reply on Jul 7, 2011 7:12 AM by zyberkid

    Straight Double Quotes


      i have some different problem with the handling the double quote


      need to insert some text with inch symbol (Straight Double Quotes)

      the text is having a single double quote when placed in the text frame it becomes right double quote by default.

      e.g. 12 * 13"

      i find it hard to bend it to straight double quote.

      i found there is a SpecialCharacters.DOUBLE_STRAIGHT_QUOTE but i don't know how to use it inserting in the textframe hence it is number value.

        • 1. Re: Straight Double Quotes
          Kasyan Servetsky Level 5

          Example (inserts a straight double quote at the end of the text frame) :

          textFrame.insertionPoints[-1].contents = SpecialCharacters.DOUBLE_STRAIGHT_QUOTE;
          1 person found this helpful
          • 2. Re: Straight Double Quotes
            zyberkid Level 1

            hi kasyan



            but you know i 'm doing like this


            create a temp text frame ,

            insert this straight double quotes in the textframe

            write string .replace to the existing string which has curly quotes with the temp textframe.contents

            but you know after replacing it too becomes curly


            the sample code.


            var dummyTF = actDoc.textFrames.add();
            dummyTF.insertionPoints[-1].contents = SpecialCharacters.DOUBLE_STRAIGHT_QUOTE;
            this.textContents = this.textContents.replace("x", dummyTF.contents );
                                                                        //this.textContents = this.textContents.replace(/(“|”)/g, "-" );
                                                                        refDebugInfo += "\n Current Content : " + this.textContents;
            txtFrm.contents = this.textContents ;
            • 3. Re: Straight Double Quotes
              Kasyan Servetsky Level 5

              I can't test it myself at the moment, but try to turn off auto replacement of quotes feature in the InDesign's preferences.

              1 person found this helpful
              • 4. Re: Straight Double Quotes
                zyberkid Level 1

                this one really helped, thanks.. kasyan.

                toggle on when need to insert a straight quote on any text frame and toggle off when finished working with single straight quotes


                app.activeDocument.textPreferences.typographersQuotes = false;

                • 5. Re: Straight Double Quotes
                  zyberkid Level 1

                  app.activeDocument.textPreferences.typographersQuotes = false;