Dirty work-around for getText() in WYSIWYG-mode
authorAlexander Ebert <ebert@woltlab.com>
Mon, 31 Mar 2014 20:33:34 +0000 (22:33 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 31 Mar 2014 20:33:34 +0000 (22:33 +0200)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js

index fc5075c65e8b77c4f35276222b5cb31aca1566fe..4381336401568cee5acfb27c0cd14808594e7377 100644 (file)
@@ -148,9 +148,12 @@ RedactorPlugins.wutil = {
         */
        getText: function() {
                if (this.inWysiwygMode()) {
-                       this.sync();
+                       this.toggle();
                        
-                       this._convertFromHtml();
+                       var $content = this.$source.val();
+                       
+                       this.toggle();
+                       return $content;
                }
                
                return this.$source.val();