Skip to content

Commit

Permalink
5274 - Added missed froala options (#132)
Browse files Browse the repository at this point in the history
* Modified code for FroalaEditorType.php to include recent updates
  • Loading branch information
jyothigayathri authored Jun 19, 2024
1 parent 6c584c3 commit 33bec4f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Form/Type/FroalaEditorType.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ public function buildView(FormView $view, FormInterface $form, array $options):

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

$view->vars['froala_arrOption']['pluginsEnabled'] = $this->pluginProvider->obtainArrPluginCamelized($arrPlugin);
$view->vars['froala_arrOption']['pluginsEnabled'] = array_map(function (string $plugin) {
return 'trackChanges' === $plugin ? 'track_changes' : $plugin;
}, $this->pluginProvider->obtainArrPluginCamelized($arrPlugin));
$view->vars['froala_arrPluginJS'] = $this->pluginProvider->obtainArrPluginJS($arrPlugin);
$view->vars['froala_arrPluginCSS'] = $this->pluginProvider->obtainArrPluginCSS($arrPlugin);
$view->vars['froala_events'] = $arrEvent;
Expand Down
1 change: 1 addition & 0 deletions src/Service/PluginProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class PluginProvider
'save' => [self::KEY_CSS => 0, self::KEY_FOLDER => self::VALUE_PLUGINS],
'special_characters' => [self::KEY_CSS => 1, self::KEY_FOLDER => self::VALUE_PLUGINS],
'table' => [self::KEY_CSS => 1, self::KEY_FOLDER => self::VALUE_PLUGINS],
'track_changes' => [self::KEY_CSS => 0, self::KEY_FOLDER => self::VALUE_PLUGINS],
'url' => [self::KEY_CSS => 0, self::KEY_FOLDER => self::VALUE_PLUGINS],
'video' => [self::KEY_CSS => 1, self::KEY_FOLDER => self::VALUE_PLUGINS],
'word_paste' => [self::KEY_CSS => 0, self::KEY_FOLDER => self::VALUE_PLUGINS],
Expand Down
6 changes: 6 additions & 0 deletions src/Utility/UConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ abstract class UConfiguration
'imagePasteProcess' => null,
'initOnClick' => null,
'keepFormatOnDelete' => null,
'keepTextFormatOnTable' => null,
'linkAlwaysBlank' => null,
'linkAlwaysNoFollow' => null,
'linkConvertEmailAddress' => null,
Expand All @@ -56,9 +57,11 @@ abstract class UConfiguration
'paragraphMultipleStyles' => null,
'pasteAllowLocalImages' => null,
'pastePlain' => null,
'preserveTabSpaces' => null,
'requestWithCredentials' => null,
'requestWithCORS' => null,
'shortcutsHint' => null,
'showChangesEnabled' => null,
'spellcheck' => null,
'tableCellMultipleStyles' => null,
'tableMultipleStyles' => null,
Expand All @@ -69,6 +72,7 @@ abstract class UConfiguration
'toolbarSticky' => null,
'toolbarVisibleWithoutSelection' => null,
'tooltips' => null,
'trackChangesEnabled' => null,
'useClasses' => null,
'videoMove' => null,
'videoResize' => null,
Expand Down Expand Up @@ -130,6 +134,8 @@ abstract class UConfiguration
'filesManagerUploadURL' => null,
'fontAwesomeTemplate' => null,
'fontSizeUnit' => null,
'fontFamilyDefaultSelection' => null,
'fontSizeDefaultSelection' => null,
'iconsTemplate' => null,
'iframeDefaultStyle' => null,
'iframeStyle' => null,
Expand Down

0 comments on commit 33bec4f

Please sign in to comment.