From: Alexander Ebert Date: Sun, 30 Mar 2014 17:04:52 +0000 (+0200) Subject: Improved image handling in Redactor, disabled image resize X-Git-Tag: 2.1.0_Alpha_1~933 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ee0cf73865bacc3ec29ebd5f86e6307c397cb986;p=GitHub%2FWoltLab%2FWCF.git Improved image handling in Redactor, disabled image resize --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index 9f639705a9..7c9365165e 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -181,7 +181,7 @@ RedactorPlugins.wbbcode = { html = html.replace(/]*?class="smiley" alt="([^"]+?)".*?>/gi, '$1'); // chrome, ie // [img] - html = html.replace(/]*?src=(["'])([^"']+?)\1 style="float: (left|right)".*?>/gi, "[img='$2',$3][/img]"); + html = html.replace(/]*?src=(["'])([^"']+?)\1 style="float: (left|right)[^"]*".*?>/gi, "[img='$2',$3][/img]"); html = html.replace(/]*?src=(["'])([^"']+?)\1.*?>/gi, '[img]$2[/img]'); // [quote] diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js index 67e166d1d9..cc1678d936 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js @@ -50,6 +50,11 @@ RedactorPlugins.wmonkeypatch = { $mpModalInit.call(self, title, content, width, callback); }; + var $mpImageResizeControls = this.imageResizeControls; + this.imageResizeControls = function(image) { + return $mpImageResizeControls.call(self, image).hide(); + }; + this.setOption('modalOpenedCallback', $.proxy(this.modalOpenedCallback, this)); this.modalTemplatesInit(); @@ -114,12 +119,43 @@ RedactorPlugins.wmonkeypatch = { + '
' + '
' + '' + + '
' + + '
' + + '
' + + '' + + '
' + + '
' + '' + '
' + '' + '
' ); + this.setOption('modal_image_edit', this.getOption('modal_image').replace( + '', + '' + )); + + this.setOption('modal_link', + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '' + + '
' + ); + this.setOption('modal_table', '
' + '
' @@ -148,42 +184,13 @@ RedactorPlugins.wmonkeypatch = { + '' + '' + '', - - modal_image_edit: String() - + '
' - + '' - + '' - + '' - + '' - + '' - + '' - + '' - + '
' - + '
' - + '' - + '' - + '' - + '
', - + // img edit + // img - modal_link: String() - + '' - + '
' - + '' - + '' - + '
', + // link + + // table modal_video: String() + '
' @@ -274,5 +281,5 @@ RedactorPlugins.wmonkeypatch = { callback.call(this, node); }, this ) ); - }, + } } \ No newline at end of file