6 Replies Latest reply on Jun 24, 2015 3:05 PM by resdesign

    Text box formatting and how to make smaller edge.js files

    pixelwrangler Level 1

      I have a project that has 16 different text boxes. They are displayed or hidden depending on a user's button clicks. Everything works as expected, but a look at the large edge.js file shows a LOT of redundant text formatting code. All of the text boxes are formatted exactly the same, and each one is a Symbol.

       

      For instance, the text box might look like this:

       

      First line

      Second line

      Third line

       

      Edge does not allow for using anything other than a <p> or <div> tag for each line, that is, no <ul> or <li> elements can be created directly in Edge.

       

      The relevant part of the resultant published edge.js file looks like this:

       

      s104="<p style=\"margin: 0px; font-family: Arial, Helvetica, sans-serif; font-weight: 400; font-style: normal; text-decoration: none; font-size: 12px; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); letter-spacing: 0px; text-transform: none; word-spacing: 0px; text-align: start; text-indent: 0px; line-height: normal;\">First line</p><p style=\"margin: 0px; font-family: Arial, Helvetica, sans-serif; font-weight: 400; font-style: normal; text-decoration: none; font-size: 12px; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); letter-spacing: 0px; text-transform: none; word-spacing: 0px; text-align: start; text-indent: 0px; line-height: normal;\">Second line</p><p style=\"margin: 0px; font-family: Arial, Helvetica, sans-serif; font-weight: 400; font-style: normal; text-decoration: none; font-size: 12px; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); letter-spacing: 0px; text-transform: none; word-spacing: 0px; text-align: start; text-indent: 0px; line-height: normal;\">Third line</p>

       

      That's a LOT of unnecessary code! There has to be a simple way to do this with with CSS, such as adding a class to each Symbol - but that does not eliminate the inline styling rules.

       

      You can only imagine how much space is eaten up by these text boxes, many of which have over 10 lines (<p> elements) each.

       

      Anyone know how to get around this?

       

      TIA!