Hema Ramasamy
Hema Ramasamy

Reputation: 726

table is not resizable in tinyMCE 4 in jquery

Table properties are not worked in tinyMCE 4 inline editors, I tried to set the default style for table

table_default_styles: {
            width: '50%'
        },

It's not applied and the table resizable also not working, though I used every property

table_column_resizing: 'resizetable',

the table looks like this,

enter image description here

Upvotes: 1

Views: 126

Answers (1)

Michael Fromin
Michael Fromin

Reputation: 13744

The table_column_resizing option was added to TinyMCE 5.5 so that is not a valid configuration option for TinyMCE 4:

https://www.tiny.cloud/docs/release-notes/release-notes55/#newtable_column_resizingoptionforcontrollingtablecolumnresizing

I would note that the option does not determine if the table is resizable but rather the behavior that happens when a table is resized.

When I add a table to TinyMCE using your table_default_styles configuration option I get this HTML:

<table style="width: 50%;" border="1">
<tbody>
<tr>
  <td style="width: 48.7125%;">&nbsp;</td>
  <td style="width: 48.7996%;">&nbsp;</td>
</tr>
<tr>
  <td style="width: 48.7125%;">&nbsp;</td>
  <td style="width: 48.7996%;">&nbsp;</td>
</tr>
</tbody>
</table>

...which takes up half of the editor as I would expect. Here is a TinyMCE Fiddle demonstrating this: https://fiddle.tiny.cloud/L4haab

I have attached screenshots of the latest TinyMCE 5 and TinyMCE 4 - neither of which show the outcome you have in your screenshot.

TinyMCE 5 enter image description here

TinyMCE 4 enter image description here

Note: TinyMCE 4 is no longer a supported/developed version of TinyMCE so you would likely benefit from moving to TinyMCE 5 as that version is still under active development.

Upvotes: 1

Related Questions