Skip to content

Commit

Permalink
Use legacy mode for injected editors
Browse files Browse the repository at this point in the history
Fixes #491
  • Loading branch information
daftspunk committed Sep 8, 2021
1 parent 1c68bae commit 2f32ff0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion controllers/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,10 @@ protected function addPageSyntaxFields($formWidget, $page)
foreach ($fields as $fieldCode => $fieldConfig) {
if ($fieldConfig['type'] == 'fileupload') continue;

if (in_array($fieldConfig['type'], ['richeditor', 'codeeditor'])) {
$fieldConfig['legacyMode'] = true;
}

if ($fieldConfig['type'] == 'repeater') {
if (empty($fieldConfig['form']) || !is_string($fieldConfig['form'])) {
$fieldConfig['form']['fields'] = array_get($fieldConfig, 'fields', []);
Expand Down Expand Up @@ -667,7 +671,8 @@ protected function addPagePlaceholders($formWidget, $page)
$fieldConfig = [
'tab' => $placeholderTitle,
'stretch' => '1',
'size' => 'huge'
'size' => 'huge',
'legacyMode' => true
];

if ($info['type'] != 'text') {
Expand Down

0 comments on commit 2f32ff0

Please sign in to comment.