'permissionCanUseSmilies' => 'user.message.canUseSmilies'
]);
- BBCodeHandler::getInstance()->setAllowedBBCodes(explode(',', WCF::getSession()->getPermission('user.message.allowedBBCodes')));
+ BBCodeHandler::getInstance()->setDisallowedBBCodes(explode(',', WCF::getSession()->getPermission('user.message.disallowedBBCodes')));
}
/**
<div class="formSubmit">
<input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
<button name="draft" accesskey="d" value="1">{lang}wcf.conversation.button.saveAsDraft{/lang}</button>
- {include file='messageFormPreviewButton'}
+ {include file='messageFormPreviewButton' previewMessageObjectType='com.woltlab.wcf.conversation.message' previewMessageObjectID=0}
{@SECURITY_TOKEN_INPUT_TAG}
</div>
</form>
+{capture assign='wysiwygSelector'}messageEditor{@$message->messageID}{/capture}
<div class="messageInlineEditor">
- <textarea id="messageEditor{@$message->messageID}" class="wysiwygTextarea"
+ <textarea id="{$wysiwygSelector}" class="wysiwygTextarea"
data-autosave="com.woltlab.wcf.conversation.messageEdit-{@$message->messageID}"
data-support-mention="true"
>{$message->message}</textarea>
<div class="formSubmit">
<button class="buttonPrimary" data-type="save">{lang}wcf.global.button.submit{/lang}</button>
+
+ {include file='messageFormPreviewButton' previewMessageFieldID=$wysiwygSelector previewButtonID=$wysiwygSelector|concat:'_PreviewButton' previewMessageObjectType='com.woltlab.wcf.conversation.message' previewMessageObjectID=$message->messageID}
+
<button data-type="cancel">{lang}wcf.global.button.cancel{/lang}</button>
</div>
<footer class="messageFooter">
<div class="formSubmit">
<button class="buttonPrimary" data-type="save" accesskey="s">{lang}wcf.global.button.submit{/lang}</button>
+ {include file='messageFormPreviewButton' previewMessageObjectType='com.woltlab.wcf.conversation.message' previewMessageObjectID=0}
</div>
</footer>
</div>