2 Replies Latest reply on Apr 10, 2013 8:58 PM by Gdaimon

    justify text

    Gdaimon Level 1

      hello, you can justify text within a form with a javascript, or how it could make

       

      for example:

       

      WAVY SMART V2, SERIAL: TRADEMARK REGISTRATION COMO8408 FOSBER, Year Built 2010, consisting of: ROLLER preconditioner LINER 500; preconditioner MEDIUM ROLLER 500; STRUCTURE PREHEATER 1100; Q0 ELECTRIC MAIN BOARD, EXTERNAL HEATER ROLLER 1100; STRUCTURE OF UP TO BRIDGE; BAR TORSION; FAN SET ENGOM ADOR; PROTECTIVE GUARDS MACHINE; ELECTRICAL SUPPLIES SUCH AS COMPUTER LENOVO BRAND: TYPE: 2476G - P7G, PRODUCT ID: 2746 P7G S / N: R8-KVCCE 09/12; mechanical materials, machine body; CONTROL CONSOLE C0; COOLER (CHILLER); STRUCTURE pass paper, manuals, corrugating rolls TYPE B; BRIDGES, JACK TYPE LADDER RACK, LADDER TYPE CAT; STRUCTURE FOR TYPE C corrugating rolls; GEAR, ELECTRIC FOR TRANSPORT TRUCK corrugating rolls , Trading Tools, KIT PARTS AND TOOLS FOR NORMAL OPERATION AND INSTALLATION INCLUDING: LAMP REF.

        • 1. Re: justify text
          gkaiseril MVP & Adobe Community Professional

          Your example is not very clear.

           

          Text fields has a "Rich Text" format option that allows one to use the Properties tool to format text within a form field to some extent. This "Rich Text" option is not the same as the RTF, Rich Text Format, file type. There is also the "Multi line" option to allow multiple lines within a form field.

           

          If you want to use JavaScript to format the data within such a field, you will have to use the "span" object and its properties.

           

          Try this example using the superscript property:

           

          var f = this.getField("myRichField");  // Create an array to hold the Span objects;

          var spans = new Array();  // Each Span object is an object, so we must create one;

          spans[0] = new Object();

          spans[0].alignment = "center"; spans[0].text = "The answer is x";

          spans[1] = new Object();

          spans[1].text = "2/3";

          spans[1].superscript = true;  spans[2] = new Object();

          spans[2].superscript = false;

          spans[2].text = ".  ";

          spans[3] = new Object();

          spans[3].underline = true;

          spans[3].text = "Did you get it right?";

          spans[3].fontStyle = "italic";

          spans[3].textColor = color.red;

          // Now assign our array of Span objects to the field using;

          // field.richValue;

          f.richValue = spans;

           

          And observe what happens.

           

           

          • 2. Re: justify text
            Gdaimon Level 1

            My apologies, I'm starting to learn javascript and handle and can not understand your help, I may be able to better explain