mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #9733 from creative-commoners/pulls/4.6/fix-tinymce-image-configs
FIX TinyMCEConfig image size presets handle incorrect values
This commit is contained in:
commit
01b5551a5b
@ -16,7 +16,7 @@ SilverStripe\Core\Injector\Injector:
|
||||
|
||||
SilverStripe\Forms\HTMLEditor\TinyMCEConfig:
|
||||
image_size_presets:
|
||||
- width: 600,
|
||||
- width: 600
|
||||
i18n: SilverStripe\Forms\HTMLEditor\TinyMCEConfig.BEST_FIT
|
||||
text: Best fit
|
||||
name: bestfit
|
||||
|
@ -694,6 +694,10 @@ class TinyMCEConfig extends HTMLEditorConfig implements i18nEntityProvider
|
||||
}
|
||||
|
||||
foreach ($settings['image_size_presets'] as &$preset) {
|
||||
if (isset($preset['width'])) {
|
||||
$preset['width'] = (int) $preset['width'];
|
||||
}
|
||||
|
||||
if (isset($preset['i18n'])) {
|
||||
$preset['text'] = _t(
|
||||
$preset['i18n'],
|
||||
|
Loading…
Reference in New Issue
Block a user