-<span class="mediaBBCode{if $float != 'none'} messageFloatObject{$float|ucfirst}{/if}">
+<div class="mediaBBCode{if $float != 'none'} messageFloatObject{$float|ucfirst}{/if}">
{if $thumbnailSize != 'original'}
<a href="{$media->getLink()}" class="embeddedAttachmentLink jsImageViewer"><img src="{$media->getThumbnailLink($thumbnailSize)}" alt="{$media->altText}" title="{$media->title}" data-width="{@$media->getThumbnailWidth($thumbnailSize)}" data-height="{@$media->getThumbnailHeight($thumbnailSize)}"></a>
{else}
{/if}
{if $media->caption}
- <span class="mediaBBCodeCaption">{$media->caption}</span>
+ <div class="mediaBBCodeCaption">
+ {if $media->captionEnableHtml}
+ {@$media->caption}
+ {else}
+ {$media->caption}
+ {/if}
+ </div>
{/if}
-</span>
+</div>
{if $availableLanguages|count > 1}
{include file='multipleLanguageInputJavascript' elementIdentifier='caption'|concat:'_':$media->mediaID forceSelection=true}
{/if}
-
+
+ <dl>
+ <dt></dt>
+ <dd>
+ <label>
+ <input type="checkbox" name="captionEnableHtml" value="1"{if $media->captionEnableHtml} checked{/if}>
+ <span>{lang}wcf.media.caption.enableHtml{/lang}</span>
+ </label>
+ </dd>
+ </dl>
+
<dl>
<dt><label for="altText_{@$media->mediaID}">{lang}wcf.media.altText{/lang}</label></dt>
<dd>
-<span class="mediaBBCode{if $float != 'none'} messageFloatObject{$float|ucfirst}{/if}">
+<div class="mediaBBCode{if $float != 'none'} messageFloatObject{$float|ucfirst}{/if}">
{if $thumbnailSize != 'original'}
<a href="{$media->getLink()}" class="embeddedAttachmentLink jsImageViewer"><img src="{$media->getThumbnailLink($thumbnailSize)}" alt="{$media->altText}" title="{$media->title}" data-width="{@$media->getThumbnailWidth($thumbnailSize)}" data-height="{@$media->getThumbnailHeight($thumbnailSize)}"></a>
{else}
{/if}
{if $media->caption}
- <span class="mediaBBCodeCaption">{$media->caption}</span>
+ <div class="mediaBBCodeCaption">
+ {if $media->captionEnableHtml}
+ {@$media->caption}
+ {else}
+ {$media->caption}
+ {/if}
+ </div>
{/if}
-</span>
+</div>
{include file='multipleLanguageInputJavascript' elementIdentifier='caption'|concat:'_':$media->mediaID forceSelection=true}
{/if}
+ <dl>
+ <dt></dt>
+ <dd>
+ <label>
+ <input type="checkbox" name="captionEnableHtml" value="1"{if $media->captionEnableHtml} checked{/if}>
+ <span>{lang}wcf.media.caption.enableHtml{/lang}</span>
+ </label>
+ </dd>
+ </dl>
+
<dl>
<dt><label for="altText_{@$media->mediaID}">{lang}wcf.media.altText{/lang}</label></dt>
<dd>
var categoryId = elBySel('select[name=categoryID]', content);
var altText = elBySel('input[name=altText]', content);
var caption = elBySel('textarea[name=caption]', content);
+ var captionEnableHtml = elBySel('input[name=captionEnableHtml]', content);
var title = elBySel('input[name=title]', content);
var hasError = false;
this._media.title[this._media.languageID] = title.value;
}
+ // captionEnableHtml
+ this._media.captionEnableHtml = ~~elBySel('input[name=captionEnableHtml]', content).checked;
+
var aclValues = {
allowAll: ~~elById('mediaEditor_' + this._media.mediaID + '_aclAllowAll').checked,
group: [],
altText: this._media.altText,
caption: this._media.caption,
data: {
+ captionEnableHtml: this._media.captionEnableHtml,
categoryID: this._media.categoryID,
isMultilingual: this._media.isMultilingual,
languageID: this._media.languageID
* @property-read string $username name of the user who uploaded the media file
* @property-read integer|null $languageID id of the language associated with the media file or null if the media file is multilingual or if the language has been deleted
* @property-read integer $isMultilingual is `1` if the media file's title, description and altText is available in multiple languages, otherwise `0`
+ * @property-read integer $captionEnableHtml is `1` if html code in caption is supported, otherwise `0`
* @property-read integer $isImage is `1` if the media file is an image, otherwise `0`
* @property-read integer $width width of the media file if `$isImage` is `1`, otherwise `0`
* @property-read integer $height height of the media file if `$isImage` is `1`, otherwise `0`
return [
'altText' => $media instanceof ViewableMedia ? $media->altText : [],
'caption' => $media instanceof ViewableMedia ? $media->caption : [],
+ 'captionEnableHtml' => $media->captionEnableHtml,
'categoryID' => $media->categoryID,
'fileHash' => $media->fileHash,
'filename' => $media->filename,
<item name="wcf.media.button.insert"><![CDATA[Einfügen]]></item>
<item name="wcf.media.button.select"><![CDATA[Auswählen]]></item>
<item name="wcf.media.caption"><![CDATA[Bildunterschrift]]></item>
+ <item name="wcf.media.caption.enableHtml"><![CDATA[HTML in der Bildunterschrift verwenden]]></item>
<item name="wcf.media.category.choose"><![CDATA[Kategorien]]></item>
<item name="wcf.media.categoryID"><![CDATA[Kategorie]]></item>
<item name="wcf.media.chooseImage"><![CDATA[Bild auswählen]]></item>
<item name="wcf.media.button.insert"><![CDATA[Insert]]></item>
<item name="wcf.media.button.select"><![CDATA[Select]]></item>
<item name="wcf.media.caption"><![CDATA[Caption]]></item>
+ <item name="wcf.media.caption.enableHtml"><![CDATA[Enable HTML code in caption]]></item>
<item name="wcf.media.category.choose"><![CDATA[Categories]]></item>
<item name="wcf.media.categoryID"><![CDATA[Category]]></item>
<item name="wcf.media.chooseImage"><![CDATA[Select Image]]></item>
username VARCHAR(255) NOT NULL,
languageID INT(10),
isMultilingual TINYINT(1) NOT NULL DEFAULT 0,
+ captionEnableHtml TINYINT(1) NOT NULL DEFAULT 0,
isImage TINYINT(1) NOT NULL DEFAULT 0,
width SMALLINT(5) NOT NULL DEFAULT 0,