# email/transformations/transformemailaligntoattribute

module

<a id="constants">

## Constants

<a id="constant-transformEmailAlignToAttribute">

### `transformEmailAlignToAttribute: ExportInlineStylesTransformation`

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)
```

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
