Skip to content

Commit 33bec4f

Browse files
5274 - Added missed froala options (#132)
* Modified code for FroalaEditorType.php to include recent updates
1 parent 6c584c3 commit 33bec4f

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/Form/Type/FroalaEditorType.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ public function buildView(FormView $view, FormInterface $form, array $options):
9595

9696
$arrPlugin = $this->pluginProvider->obtainArrPluginToInclude($arrPluginEnabled, $arrPluginDisabled);
9797

98-
$view->vars['froala_arrOption']['pluginsEnabled'] = $this->pluginProvider->obtainArrPluginCamelized($arrPlugin);
98+
$view->vars['froala_arrOption']['pluginsEnabled'] = array_map(function (string $plugin) {
99+
return 'trackChanges' === $plugin ? 'track_changes' : $plugin;
100+
}, $this->pluginProvider->obtainArrPluginCamelized($arrPlugin));
99101
$view->vars['froala_arrPluginJS'] = $this->pluginProvider->obtainArrPluginJS($arrPlugin);
100102
$view->vars['froala_arrPluginCSS'] = $this->pluginProvider->obtainArrPluginCSS($arrPlugin);
101103
$view->vars['froala_events'] = $arrEvent;

src/Service/PluginProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class PluginProvider
5555
'save' => [self::KEY_CSS => 0, self::KEY_FOLDER => self::VALUE_PLUGINS],
5656
'special_characters' => [self::KEY_CSS => 1, self::KEY_FOLDER => self::VALUE_PLUGINS],
5757
'table' => [self::KEY_CSS => 1, self::KEY_FOLDER => self::VALUE_PLUGINS],
58+
'track_changes' => [self::KEY_CSS => 0, self::KEY_FOLDER => self::VALUE_PLUGINS],
5859
'url' => [self::KEY_CSS => 0, self::KEY_FOLDER => self::VALUE_PLUGINS],
5960
'video' => [self::KEY_CSS => 1, self::KEY_FOLDER => self::VALUE_PLUGINS],
6061
'word_paste' => [self::KEY_CSS => 0, self::KEY_FOLDER => self::VALUE_PLUGINS],

src/Utility/UConfiguration.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ abstract class UConfiguration
4242
'imagePasteProcess' => null,
4343
'initOnClick' => null,
4444
'keepFormatOnDelete' => null,
45+
'keepTextFormatOnTable' => null,
4546
'linkAlwaysBlank' => null,
4647
'linkAlwaysNoFollow' => null,
4748
'linkConvertEmailAddress' => null,
@@ -56,9 +57,11 @@ abstract class UConfiguration
5657
'paragraphMultipleStyles' => null,
5758
'pasteAllowLocalImages' => null,
5859
'pastePlain' => null,
60+
'preserveTabSpaces' => null,
5961
'requestWithCredentials' => null,
6062
'requestWithCORS' => null,
6163
'shortcutsHint' => null,
64+
'showChangesEnabled' => null,
6265
'spellcheck' => null,
6366
'tableCellMultipleStyles' => null,
6467
'tableMultipleStyles' => null,
@@ -69,6 +72,7 @@ abstract class UConfiguration
6972
'toolbarSticky' => null,
7073
'toolbarVisibleWithoutSelection' => null,
7174
'tooltips' => null,
75+
'trackChangesEnabled' => null,
7276
'useClasses' => null,
7377
'videoMove' => null,
7478
'videoResize' => null,
@@ -130,6 +134,8 @@ abstract class UConfiguration
130134
'filesManagerUploadURL' => null,
131135
'fontAwesomeTemplate' => null,
132136
'fontSizeUnit' => null,
137+
'fontFamilyDefaultSelection' => null,
138+
'fontSizeDefaultSelection' => null,
133139
'iconsTemplate' => null,
134140
'iframeDefaultStyle' => null,
135141
'iframeStyle' => null,

0 commit comments

Comments
 (0)