mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT: HTMLEditorField default alignment setting
This commit is contained in:
commit
b4ba606ff2
@ -20,6 +20,12 @@ class HtmlEditorField extends TextareaField {
|
|||||||
*/
|
*/
|
||||||
private static $insert_width = 600;
|
private static $insert_width = 600;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @config
|
||||||
|
* @var string Default alignment for Images and Media. Options: leftAlone|center|left|right
|
||||||
|
*/
|
||||||
|
private static $media_alignment = 'leftAlone';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @config
|
* @config
|
||||||
* @var bool Should we check the valid_elements (& extended_valid_elements) rules from HtmlEditorConfig server side?
|
* @var bool Should we check the valid_elements (& extended_valid_elements) rules from HtmlEditorConfig server side?
|
||||||
@ -674,7 +680,9 @@ class HtmlEditorField_Toolbar extends RequestHandler {
|
|||||||
'center' => _t('HtmlEditorField.CSSCLASSCENTER', 'Centered, on its own.'),
|
'center' => _t('HtmlEditorField.CSSCLASSCENTER', 'Centered, on its own.'),
|
||||||
'left' => _t('HtmlEditorField.CSSCLASSLEFT', 'On the left, with text wrapping around.'),
|
'left' => _t('HtmlEditorField.CSSCLASSLEFT', 'On the left, with text wrapping around.'),
|
||||||
'right' => _t('HtmlEditorField.CSSCLASSRIGHT', 'On the right, with text wrapping around.')
|
'right' => _t('HtmlEditorField.CSSCLASSRIGHT', 'On the right, with text wrapping around.')
|
||||||
)
|
),
|
||||||
|
HtmlEditorField::config()->get('media_alignment')
|
||||||
|
|
||||||
)->addExtraClass('last')
|
)->addExtraClass('last')
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -808,7 +816,8 @@ class HtmlEditorField_Toolbar extends RequestHandler {
|
|||||||
'center' => _t('HtmlEditorField.CSSCLASSCENTER', 'Centered, on its own.'),
|
'center' => _t('HtmlEditorField.CSSCLASSCENTER', 'Centered, on its own.'),
|
||||||
'left' => _t('HtmlEditorField.CSSCLASSLEFT', 'On the left, with text wrapping around.'),
|
'left' => _t('HtmlEditorField.CSSCLASSLEFT', 'On the left, with text wrapping around.'),
|
||||||
'right' => _t('HtmlEditorField.CSSCLASSRIGHT', 'On the right, with text wrapping around.')
|
'right' => _t('HtmlEditorField.CSSCLASSRIGHT', 'On the right, with text wrapping around.')
|
||||||
)
|
),
|
||||||
|
HtmlEditorField::config()->get('media_alignment')
|
||||||
)->addExtraClass('last')
|
)->addExtraClass('last')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user