Skip to content

Commit

Permalink
Merge pull request #82 from waynestate/fix-default-non-user-config-im…
Browse files Browse the repository at this point in the history
…age2

Set image2 within the extraplugins if it isn't present.
  • Loading branch information
chrispelzer authored Feb 24, 2023
2 parents e47b257 + 54f1314 commit 5ec0656
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/CKEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,16 @@ protected function setFilesPlugins()
$extraPlugins[] = 'uploadimage';
}

if (!in_array('image2', $extraPlugins)) {
$extraPlugins[] = 'image2';
}

$this->options([
'extraPlugins' => implode(',', $extraPlugins),
]);
} else {
$this->options([
'extraPlugins' => 'uploadimage',
'extraPlugins' => 'image2,uploadimage',
]);
}
}
Expand Down

0 comments on commit 5ec0656

Please sign in to comment.