Open dcsaszar opened 3 months ago
@harasunu-narayan @dcsaszar I have found out the root cause of both the tickets this one and 4795.
The reason being that the font-size plugin and font-family plugin are not loaded with the link "https://cdn.skypack.dev/froala-editor@4.2.1" to download the editor resource. Therefore the default value for the Froala options fontSizeDefaultSelection and fontFamilyDefaultSelection remain undefined whose value are initially defined in the respective plugins, same as the values in workaround and these undefined values bypass the default value checks for default value of font-size and font-family set in the plugins. And that is the reason, the workaround works as well.
The proposed solution would be to add check for undefined for fontSizeDefaultSelection and fontFamilyDefaultSelection in the source code, with the currents checks for initial(default) values set in the respective plugins.
Update: after reporting #4795 I realized the workaround is the same, so these two issues probably have the same underlying bug:
As a workaround, these options can be set:
Expected behavior.
Actual behavior.
Steps to reproduce the problem.
https://codepen.io/dcsaszar/pen/vYwpNJm
Editor version.
4.2.1
(it works as expected up to 4.2.0)
OS.
macOS 14.5 (23F79)
Browser.
Chrome 125.0.6422.142
Recording.