From c540a503af886e875fe49f585dc8f91d655f094c Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 7 Jul 2016 19:13:00 +0200 Subject: [PATCH] Added events for Redactor init --- com.woltlab.wcf/templates/wysiwyg.tpl | 10 ++++++++++ wcfsetup/install/files/acp/templates/wysiwyg.tpl | 10 ++++++++++ 2 files changed, 20 insertions(+) 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); }); }); -- 2.20.1