mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT Added a new "TitleText" field to ImageForm allowing a user to select which title attribute should appear on their images inserted into the content
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75690 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
9306b8b065
commit
30481b5199
@ -245,7 +245,12 @@ function HtmlEditorField_dataValue_processImage($parts) {
|
||||
|
||||
// Insert an empty alt tag if there isn't one
|
||||
if(strpos($result, "alt=") === false) {
|
||||
$result = substr_replace($result, ' alt="" />', -2);
|
||||
$result = substr_replace($result, ' alt="" />', -3);
|
||||
}
|
||||
|
||||
// Insert an empty title tag if there isn't one (IE shows the alt as title if no title tag)
|
||||
if(strpos($result, "title=") === false) {
|
||||
$result = substr_replace($result, ' title="" />', -3);
|
||||
}
|
||||
|
||||
return $result;
|
||||
@ -423,7 +428,8 @@ class HtmlEditorField_Toolbar extends RequestHandler {
|
||||
),
|
||||
new TextField('getimagesSearch', _t('HtmlEditorField.SEARCHFILENAME', 'Search by file name')),
|
||||
new ThumbnailStripField('Image', 'FolderID', 'getimages'),
|
||||
new TextField('AltText', _t('HtmlEditorField.ALTTEXT', 'Description'), '', 80),
|
||||
new TextField('AltText', _t('HtmlEditorField.IMAGEALTTEXT', 'Alternative text'), '', 80),
|
||||
new TextField('ImageTitle', _t('HtmlEditorField.IMAGETITLE', 'Title text')),
|
||||
new CheckboxField('Caption', _t('HtmlEditorField.CAPTION', 'Include as Caption')),
|
||||
new HiddenField('CSSClass', _t('HtmlEditorField.CSSCLASS', 'Alignment / style')),
|
||||
new LiteralField('AlignmentStyle', '<div id="ImageAligmentStyle" class="field text"><label>Alignment / style</label>'),
|
||||
|
Loading…
Reference in New Issue
Block a user