How tables are formatted depends on two things:
– Settings for the table plugin in TinyMCE.
– Whether you resize the table by dragging.
By default TinyMCE Advanced sets the editor so no additional styles are added to tables. That way tables are displayed exactly how the theme intended to. This can be changed by changing some editor settings. That can be done by using the https://ww.wp.xz.cn/plugins/advanced-tinymce-configuration/ plugin. All editor settings are described here: https://www.tiny.cloud/docs/plugins/table/#table_default_attributes.
Regardless of the above settings if you resize a table by dragging the height and/or width of the table tag and cell tags will be set as inline styles.
Thanks for the answer and for the advice
But I didn’t use your configuration in earlier versions, and everything was very good. and now it’s not very convenient to work with tables in your plugin.
Please, watch the video again, I’m not dragging anything. I copy a table from another site, insert it into my editor, delete an unnecessary column and cause problems: other columns accept a specific length.
Yeah, I understand. This is how the TinyMCE table plugin works. It is meant to be “best options for most people/themes”.
If you would like to change how it works for your site/theme, try changing some of the settings for the table plugin. Changes are easier to do with https://ww.wp.xz.cn/plugins/advanced-tinymce-configuration/ but you can also make a small plugin and change (hard-code) the settings from there.
-
This reply was modified 7 years, 4 months ago by
Andrew Ozz.