tinymce / tinymce

The world's #1 JavaScript library for rich text editing. Available for React, Vue and Angular
https://www.tiny.cloud
Other
14.5k stars 2.2k forks source link

👍 Padding on Tables Elements doesn't work in some cases. #9640

Closed TopCoder02 closed 2 weeks ago

TopCoder02 commented 2 weeks ago

📝 Provide detailed reproduction steps (if any)

Please provide the steps to reproduce and if possible a minimal demo of the problem via fiddle.tiny.cloud or similar.

  1. Tiny.Fiddle - There should be a 10px padding on top, but it's not rendered in the TinyMCE WYSWYG engine
  2. JSFIDDLE - This is how it should render, you can see the padding around it.

✔️ Expected result

What is the expected result of the above steps? It should render with padding on top of the table element, like it does in the browser.

❌ Actual result

What is the actual result of the above steps? No padding is shown on top of the table element

📃 Other details

TheSpyder commented 2 weeks ago

Our default styles have border-collapse set: https://github.com/tinymce/tinymce/blob/f34c4bbcde5cad04232b3e4c5429ec52557fcbff/modules/oxide/src/less/skins/ui/default/content.less#L7-L9

You could configure custom styles that restore this to border-collapse: separate. https://www.tiny.cloud/docs/tinymce/latest/add-css-options/

TopCoder02 commented 2 weeks ago

Didn't realize this was the issue, thank you. Such an easy fix.