new UiPollEditor(
DomUtil.identify(DomTraverse.childByTag(elById('{@$field->getPrefixedId()}Container'), 'DD')),
[ {implode from=$field->getValue() item=pollOption}{ optionID: {@$pollOption[optionID]}, optionValue: '{$pollOption[optionValue]|encodeJS}' }{/implode} ],
- '{@$field->getWysiwygId()}',
+ '{@$field->getPrefixedWysiwygId()}',
{
isAjax: {if $field->getDocument()->isAjax()}true{else}false{/if},
maxOptions: {@POLL_MAX_OPTIONS}
'{$field->getAttachmentHandler()->getTmpHashes()[0]|encodeJS}',
'{@$field->getAttachmentHandler()->getParentObjectID()}',
{@$field->getAttachmentHandler()->getMaxCount()},
- '{@$field->getWysiwygId()}'
+ '{@$field->getPrefixedWysiwygId()}'
);
new WCF.Action.Delete('wcf\\data\\attachment\\AttachmentAction', '.formAttachmentList > li');
});
});
new WCF.Message.DefaultPreview({
- messageFieldID: '{@$button->getWysiwygId()}',
+ messageFieldID: '{@$button->getPrefixedWysiwygId()}',
previewButtonID: '{@$button->getPrefixedId()}',
messageObjectType: '{@$button->getObjectType()->objectType}',
messageObjectID: '{@$button->getObjectId()}'
<script data-relocate="true">
$(function() {
{if $container->children()|count > 1}
- new WCF.Message.SmileyCategories('{@$container->getWysiwygId()}');
+ new WCF.Message.SmileyCategories('{@$container->getPrefixedWysiwygId()}');
{/if}
- new WCF.Message.Smilies('{@$container->getWysiwygId()}');
+ require(['WoltLabSuite/Core/Ui/Smiley/Insert'], function(UiSmileyInsert) {
+ new UiSmileyInsert('{@$container->getPrefixedWysiwygId()}');
+ });
});
</script>
new UiPollEditor(
DomUtil.identify(DomTraverse.childByTag(elById('{@$field->getPrefixedId()}Container'), 'DD')),
[ {implode from=$field->getValue() item=pollOption}{ optionID: {@$pollOption[optionID]}, optionValue: '{$pollOption[optionValue]|encodeJS}' }{/implode} ],
- '{@$field->getWysiwygId()}',
+ '{@$field->getPrefixedWysiwygId()}',
{
isAjax: {if $field->getDocument()->isAjax()}true{else}false{/if},
maxOptions: {@POLL_MAX_OPTIONS}
});
new WCF.Message.DefaultPreview({
- messageFieldID: '{@$button->getWysiwygId()}',
+ messageFieldID: '{@$button->getPrefixedWysiwygId()}',
previewButtonID: '{@$button->getPrefixedId()}',
messageObjectType: '{@$button->getObjectType()->objectType}',
messageObjectID: '{@$button->getObjectId()}'
<script data-relocate="true">
$(function() {
{if $container->children()|count > 1}
- new WCF.Message.SmileyCategories('{@$container->getWysiwygId()}');
+ new WCF.Message.SmileyCategories('{@$container->getPrefixedWysiwygId()}');
{/if}
- new WCF.Message.Smilies('{@$container->getWysiwygId()}');
+ require(['WoltLabSuite/Core/Ui/Smiley/Insert'], function(UiSmileyInsert) {
+ new UiSmileyInsert('{@$container->getPrefixedWysiwygId()}');
+ });
});
</script>
*/
protected $wysiwygId;
+ /**
+ * Returns the prefixed id of the related `WysiwygFormField` form field.
+ *
+ * @return string
+ * @throws \BadMethodCallException if the id of the related `WysiwygFormField` form field is unknown
+ */
+ public function getPrefixedWysiwygId() {
+ return $this->getDocument()->getPrefix() . $this->getWysiwygId();
+ }
+
/**
* Returns id of the related `WysiwygFormField` form field.
*