wysiwyg-editor icon indicating copy to clipboard operation
wysiwyg-editor copied to clipboard

Inline Font Size in Table Cells Overridden by Editor Initialization Font Size in Second Column

Open mhassanedev opened this issue 1 year ago • 0 comments

Bug Description

When copying a date table (with 2 columns and 1 row) from the browser into Froala Editor, the text in the table cells behaves differently depending on the editor's initialization settings. Specifically, if a default font size is set during editor initialization, the inline font size in the first column is respected. Still, the second column’s text incorrectly adopts the editor’s default font size, even when the table tag has an inline font size.

Expected behavior.

When I paste a table with different inline font sizes in the columns, the text should retain its respective inline font sizes in both columns, regardless of the editor’s initialization settings.

Actual behavior.

The first column's inline font size is retained, but the second column's text incorrectly defaults to the editor's initialized font size, ignoring the table's inline font size.

URL

https://jsfiddle.net/m_hassan/f8yeodcp/12/

Steps to reproduce the problem.
  1. Create a simple table with 2 columns and 1 row in the browser.
  2. Column 1: Set an inline font size on the text.
  3. Column 2: Use the default font size.
  4. Copy the table and paste it into Froala Editor.
  5. Observe that the text retains the correct font size when no default font size is set during Froala Editor initialization.
  6. Set a default font size in Froala Editor during initialization.
  7. Paste the same table into the editor again.
  8. Notice that the inline font size of the first column is respected, but the text in the second column is set to the editor's default font size, despite the table tag having an inline font size.
Editor version.

v4.0.17

OS.

Window 10

Browser.

Chrome Firefox Edge

Recording.
First with the default font size in Froala Editor.

Froala Editor 01

Second, without default font size in Froala Editor.

Froala Editor 02

mhassanedev avatar Aug 23 '24 11:08 mhassanedev