Sign up (with export icon)

email/transformations/transformemailaligntoattribute

Api-module iconmodule

Constants

  • Promotes a shared alignment value from all direct children of a <td> element up to a align attribute on the cell itself, removing the per-child alignment in the process.

    Examples:

    // All children share align="center" via inline style:
    <td>
      <p style="text-align: center;">…</p>
      <p style="text-align: center;">…</p>
    </td>
    →
    <td align="center">
      <p>…</p>
      <p>…</p>
    </td>
    
    // All children share align="center" via wrapper tables:
    <td>
      <table role="presentation" width="100%"><tbody><tr><td align="center"><img …></td></tr></tbody></table>
      <table role="presentation" width="100%"><tbody><tr><td align="center"><p …></p></td></tr></tbody></table>
    </td>
    →
    <td align="center">
      <img …>
      <p …></p>
    </td>
    
    // Mixed alignments → no change:
    <td>
      <p style="text-align: center;">…</p>
      <p style="text-align: left;">…</p>
    </td>
    → (unchanged)
    
    Copy code