'{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabCode.js?v={@LAST_UPDATE_TIME}',
'{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabColor.js?v={@LAST_UPDATE_TIME}',
'{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabDragAndDrop.js?v={@LAST_UPDATE_TIME}',
- '{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabDropdown.js?v={@LAST_UPDATE_TIME}',
'{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabEvent.js?v={@LAST_UPDATE_TIME}',
'{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabFont.js?v={@LAST_UPDATE_TIME}',
'{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabFullscreen.js?v={@LAST_UPDATE_TIME}',
// WoltLab specials
'WoltLabBlock',
- 'WoltLabDropdown',
'WoltLabEvent',
'WoltLabKeydown',
'{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabCode.js?v={@LAST_UPDATE_TIME}',
'{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabColor.js?v={@LAST_UPDATE_TIME}',
'{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabDragAndDrop.js?v={@LAST_UPDATE_TIME}',
- '{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabDropdown.js?v={@LAST_UPDATE_TIME}',
'{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabEvent.js?v={@LAST_UPDATE_TIME}',
'{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabFont.js?v={@LAST_UPDATE_TIME}',
'{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabFullscreen.js?v={@LAST_UPDATE_TIME}',
'wcf.editor.image.float.left': '{lang}wcf.editor.image.float.left{/lang}',
'wcf.editor.image.float.right': '{lang}wcf.editor.image.float.right{/lang}',
'wcf.editor.image.source': '{lang}wcf.editor.image.source{/lang}',
+ 'wcf.editor.image.source.error.blocked': '{lang}wcf.editor.image.source.error.blocked{/lang}',
'wcf.editor.image.source.error.insecure': '{lang}wcf.editor.image.source.error.insecure{/lang}',
'wcf.editor.image.source.error.invalid': '{lang}wcf.editor.image.source.error.invalid{/lang}',
// WoltLab specials
'WoltLabBlock',
- 'WoltLabDropdown',
'WoltLabEvent',
'WoltLabKeydown',
customButtons: customButtons,
forceSecureImages: {if MESSAGE_FORCE_SECURE_IMAGES}true{else}false{/if},
highlighters: highlighters,
+ images: {
+ external: {if IMAGE_ALLOW_EXTERNAL_SOURCE}true{else}false{/if},
+ secureOnly: {if MESSAGE_FORCE_SECURE_IMAGES}true{else}false{/if},
+ whitelist: [
+ {implode from=$__wcf->getBBCodeHandler()->getImageExternalSourceWhitelist() item=$hostname}'{$hostname|encodeJS}'{/implode}
+ ]
+ },
media: {if $__wcf->session->getPermission('admin.content.cms.canUseMedia')}true{else}false{/if},
mediaUrl: '{link controller='Media' id=-123456789 thumbnail='void' forceFrontend=true}{/link}'
}
// set code
redactor.code.start(content);
+ redactor.WoltLabImage.validateImages();
// set value
redactor.core.textarea().val(redactor.clean.onSync(redactor.$editor.html()));
+++ /dev/null
-$.Redactor.prototype.WoltLabDropdown = function() {
- "use strict";
-
- return {
- init: function() {
- // prevent overflow: hidden on body while hovering dropdowns
- this.utils.disableBodyScroll = function() {};
- this.utils.enableBodyScroll = function() {};
-
- // disable slideUp effect for dropdowns on close
- this.WoltLabDropdown._hideAll();
-
- // disable slideDown effect for dropdowns on open
- // enforce dropdownMenu-like DOM
- this.WoltLabDropdown._show();
-
- // the original implementation didn't perform that well (especially with multiple
- // instance being launched at start) and suffered from too many live DOM manipulations
- // Integrated into Redactor itself in WoltLab Suite 5.2:
- // * this.dropdown.build
- // * this.dropdown.buildItem
- },
-
- _hideAll: function() {
- var hideAll = this.dropdown.hideAll;
- this.dropdown.hideAll = (function(e, key) {
- hideAll.call(this, e, key);
-
- $('.redactor-dropdown-' + this.uuid).stop(true, true).hide();
- }).bind(this);
- },
-
- _show: function() {
- return;
- var show = this.dropdown.show;
- this.dropdown.show = (function(e, key) {
- var $button = this.button.get(key);
- var $dropdown = $button.data('dropdown');
-
- var isActive = $button.hasClass('dropact');
-
- show.call(this, e, key);
-
- if (!isActive) {
- $dropdown.stop(true).show();
- }
- }).bind(this);
-
- }
- };
-};