Skip to content

Conversation

@RemcoSmitsDev
Copy link
Contributor

@RemcoSmitsDev RemcoSmitsDev commented Oct 25, 2025

This PR allows you to define align="right" for example to change the default alignment on HTML table columns. This PR also refactors where we store the alignments in order to make it so you can define it column based instead of only row based.

See that the Revenue column is left aligned instead of the default centered.

Result

Screenshot 2025-10-25 at 11 01 38

Code example

<table>
    <tr>
        <th rowspan="2">Region</th>
        <th colspan="2" align="left">Revenue</th>
        <th rowspan="2">Growth</th>
    </tr>
    <tr>
        <th>Q2 2024</th>
        <th>Q3 2024</th>
    </tr>
    <tr>
        <td>North America</td>
        <td>$2.8M</td>
        <td>$2.4B</td>
        <td>+85,614%</td>
    </tr>
    <tr>
        <td>Europe</td>
        <td>$1.2M</td>
        <td>$1.9B</td>
        <td>+158,233%</td>
    </tr>
    <tr>
        <td>Asia-Pacific</td>
        <td>$0.5M</td>
        <td>$1.4B</td>
        <td>+279,900%</td>
    </tr>
</table>

Release Notes:

  • markdown preview: Add support for HTML table column align attribute

This allows you to define `align="right"` for example to change the
default alignment
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Oct 25, 2025
Copy link
Member

@bennetbo bennetbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@bennetbo bennetbo merged commit 79ef10b into zed-industries:main Oct 25, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement community champion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants