Problem/Motivation
With the plugin settings Font family (same for Font size) activated, the change of the family is not applied to the text selection with nested spans, through the editor.
With the option "supportAllValues" set to True, all is ok and the font family is well applied.
<!--break-->
Steps to reproduce
In the CKEditor interface, source editing :
<span style="font-size:20px;" class="A">aaa <span style="font-size:12px;font-family:Poppins;" class="B">bbb </span><br />ccc</span><br><br><span style="font-size:20px;">ddd <span style="font-size:12px;">eee </span>fff</span>
With the editor, if I select "aabb" and choose the font "Courier New" for example, the result is :
<p>
<span style="font-size:20px;"><span class="A">a</span></span><span style="font-family:'Courier New', Courier, monospace;font-size:20px;"><span class="A">aa </span></span><span style="font-family:'Courier New', Courier, monospace;font-size:12px;"><span class="A B" style="font-family:Poppins;">bb</span></span><span style="font-size:12px;"><span class="A B" style="font-family:Poppins;">b </span></span><br>
<span style="font-size:20px;"><span class="A">ccc</span></span><br>
<br>
<span style="font-size:20px;">ddd </span><span style="font-size:12px;">eee </span><span style="font-size:20px;">fff</span>
</p>
The important part is "bb" so that "Poppins" is still applied to "bb" instead of "Courier New".
Proposed resolution
Basic proposition :
Set the default value to True for the method getDynamicPluginConfig (ckeditor5_plugin_pack\modules\ckeditor5_plugin_pack_font\src\Plugin\CKEditor5Plugin\FontFamily.php and
ckeditor5_plugin_pack\modules\ckeditor5_plugin_pack_font\src\Plugin\CKEditor5Plugin\FontSize.php) :
if (!empty($options)) {
$static_plugin_config['fontFamily']['options'] = $options;
$static_plugin_config['fontFamily']['supportAllValues'] = TRUE;
}
if (!empty($options)) {
$static_plugin_config['fontSize']['options'] = $options;
$static_plugin_config['fontSize']['supportAllValues'] = TRUE;
}
UI proposition : admin/config/content/formats/manage/full_html
Add a checkbox "Use CKEditor5 default supportAllValues ?" within the sections "Font family" and "Font size". It would have the same effect which set the config supportAllValues to True.