1 Reply Latest reply on Jan 14, 2013 1:43 PM by Kzer-Za

    Table component uses outdated attributes

    Kzer-Za Level 1

      The text editor's table plugin [The table component] uses outdated markup for centering items vertically in a table cell:

       

      It renders: <td valign="middle">

      instead of using the modern:

      <td style="vertical-align:middle">

       

      This breaks the layout. I need to find out how to update the table plugin for the text editor.

       

      Anyone knows how to fix this?

       

      Thanks in advance,

      David

        • 1. Re: Table component uses outdated attributes
          Kzer-Za Level 1

          I got a patch from Adobe support:

           

          You can do this change in [1] around line 672. You can change it to [3].

          Note that isIE is declared in [2] around line 67. You can remove the setAttribute all together if you want to use style attribute for all browsers.

           

          [1] /libs/cq/ui/widgets/source/widgets/form/rte/commands/Table.js

           

          [2] /libs/cq/ui/widgets/source/ext/source/ext-core/src/core/Ext.js

           

          [3]

          if (config.valign) {

                      if (config.valign != noneConfig) {

          com.setAttribute(dom, "valign", config.valign);

                          if (!CQ.Ext.isIE){

          dom.style.verticalAlign = config.valign;

                          }

                      } else {

          com.removeAttribute(dom, "valign");

                          if (!CQ.Ext.isIE){

          dom.style.verticalAlign = "";

                          }

           

                      }

                  }

           

          Regards,

            Pierre Chamoun