Added events for Redactor init
authorAlexander Ebert <ebert@woltlab.com>
Thu, 7 Jul 2016 17:13:00 +0000 (19:13 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 7 Jul 2016 17:13:06 +0000 (19:13 +0200)
com.woltlab.wcf/templates/wysiwyg.tpl
wcfsetup/install/files/acp/templates/wysiwyg.tpl

index 13d069435a28be91946d2b13e5c0994745e08f04..3183d0b94c6d4184d185d8f66dce073d194b590f 100644 (file)
                        '{@$__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({
                        // 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);
                });
        });
index 13d069435a28be91946d2b13e5c0994745e08f04..3183d0b94c6d4184d185d8f66dce073d194b590f 100644 (file)
                        '{@$__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({
                        // 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);
                });
        });