From: Alexander Ebert Date: Thu, 7 Jul 2016 17:13:00 +0000 (+0200) Subject: Added events for Redactor init X-Git-Tag: 3.0.0_Beta_1~1244 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c540a503af886e875fe49f585dc8f91d655f094c;p=GitHub%2FWoltLab%2FWCF.git Added events for Redactor init --- diff --git a/com.woltlab.wcf/templates/wysiwyg.tpl b/com.woltlab.wcf/templates/wysiwyg.tpl index 13d069435a..3183d0b94c 100644 --- a/com.woltlab.wcf/templates/wysiwyg.tpl +++ b/com.woltlab.wcf/templates/wysiwyg.tpl @@ -40,6 +40,11 @@ '{@$__wcf->getPath()}js/3rdParty/redactor2/redactor.min.js?v={@LAST_UPDATE_TIME}', '{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/combined.min.js?v={@LAST_UPDATE_TIME}' {/if} + + {if $__redactorJavaScript|isset}{@$__redactorJavaScript}{/if} + {assign var=$__redactorJavaScript value=''} + + {event name='redactorJavaScript'} ], function () { require(['Language', 'WoltLab/WCF/Ui/Redactor/Metacode'], function(Language, UiRedactorMetacode) { Language.addObject({ @@ -171,6 +176,11 @@ // already and we can safely add all icons config.plugins.push('WoltLabButton'); + {if $__redactorConfig|isset}{@$__redactorConfig}{/if} + {assign var=$__redactorConfig value=''} + + {event name='redactorConfig'} + $(element).redactor(config); }); }); diff --git a/wcfsetup/install/files/acp/templates/wysiwyg.tpl b/wcfsetup/install/files/acp/templates/wysiwyg.tpl index 13d069435a..3183d0b94c 100644 --- a/wcfsetup/install/files/acp/templates/wysiwyg.tpl +++ b/wcfsetup/install/files/acp/templates/wysiwyg.tpl @@ -40,6 +40,11 @@ '{@$__wcf->getPath()}js/3rdParty/redactor2/redactor.min.js?v={@LAST_UPDATE_TIME}', '{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/combined.min.js?v={@LAST_UPDATE_TIME}' {/if} + + {if $__redactorJavaScript|isset}{@$__redactorJavaScript}{/if} + {assign var=$__redactorJavaScript value=''} + + {event name='redactorJavaScript'} ], function () { require(['Language', 'WoltLab/WCF/Ui/Redactor/Metacode'], function(Language, UiRedactorMetacode) { Language.addObject({ @@ -171,6 +176,11 @@ // already and we can safely add all icons config.plugins.push('WoltLabButton'); + {if $__redactorConfig|isset}{@$__redactorConfig}{/if} + {assign var=$__redactorConfig value=''} + + {event name='redactorConfig'} + $(element).redactor(config); }); });