question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

table plugin add unnecessary height and width

See original GitHub issue

With create a table its add width to every TD

<tr>
<td style="width: 20%;">&nbsp;</td>
<td style="width: 20%;">&nbsp;</td>
</tr>
<tr>
<td style="width: 20%;">&nbsp;</td>
<td style="width: 20%;">&nbsp;</td>
</tr>

But to set the width in every TD for every TR is not necessary and have no benefits. A cell can’t get different widths in a column. So I would like only in the first TR get the width in TD. When delete the first row, the second row (new first) must inherit the width from deleted one.

The same happen with height in table. After resize a single row, its add it for all TR and TD a height.

<tr style="height: 25px;">
<td style="width: 20%; height: 25px;">&nbsp;</td>
<td style="width: 20%; height: 25px;">&nbsp;</td>
</tr>
<tr style="height: 18px;">
<td style="width: 20%; height: 18px;">&nbsp;</td>
<td style="width: 20%; height: 18px;">&nbsp;</td>
</tr>

Why tinymce add height to every TR and TD? Why not only TR? Again, a row can’t have different heights in a single row. And why its add height to all TR/TD and not only the single resized one? This feature make extensive tables very big in size.

Is here maybe a function that make the html better?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
jordanadecommented, Mar 27, 2019

And why can’t we, even with table_resize_bars set to false, prevent table resizing in the first place! I want a nice clean table with NO inline styles!

0reactions
lnewsoncommented, Jun 29, 2020

Also worth noting in TinyMCE 5.4 we’re adding better support for tables that have no set widths.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML table with 100% width, with vertical scroll inside tbody
In order to fix that, we have to calculate the width of tbody columns and apply the corresponding value to the thead columns...
Read more >
Table Layouts - W3C
Percentages on 'width' and 'height' on the table are relative to the table wrapper box's containing block, not the table wrapper box itself....
Read more >
A Complete Guide to the Table Element | CSS-Tricks
Add up the values for each table cell in that table row to get the final value. ... The table element itself is...
Read more >
HTML Tables: All there is to know about them - freeCodeCamp
The short answer would be — yes. In order for the browsers to display the table, the HTML table attributes, particularly the HEIGHT...
Read more >
Setting Height And Width On Images Is Important Again
However, adding width and height attributes to your <img> markup have ... override the width of the image and constrain it when necessary, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found