froala / wysiwyg-editor

The next generation Javascript WYSIWYG HTML Editor.
https://www.froala.com/wysiwyg-editor
Other
5.28k stars 673 forks source link

Froala 4.2.1: Setting `fontSizeDefaultSelection` in the config results in multiple wrapper divs being added to content on subsequent edits #4801

Open scottwilkin opened 2 months ago

scottwilkin commented 2 months ago
Expected behavior.

When the editor is initialized on a text area containing content that has been previously formatted with the editor it should not add another wrapper div that sets the font-size inline on subsequent edits.

Actual behavior.

When editing content previously formatted with the editor multiple wrapping divs are being added to the content.

Steps to reproduce the problem.

With a configuration like seen in this fiddle: https://jsfiddle.net/t4csdhmn/2/ when editing the content subsequent occasions multiple wrapping font-size divs are being applied to the content see screen shot:

Screenshot 2024-07-11 at 3 06 43 PM
Editor version.

4.2.1

OS.

macOS 13.6.2 (22G320)

Browser.

Version 126.0.6478.127 (Official Build) (arm64)

scottwilkin commented 2 months ago

If fontSizeDefaultSelection is disabled it doesn't try to add the wrapping div.

hattapoglu commented 1 month ago

Related to #4794 and #4795