CKEditor adds an empty <p> which breaks line breaks in Firefox
authorAlexander Ebert <ebert@woltlab.com>
Tue, 11 Mar 2014 12:15:35 +0000 (13:15 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 11 Mar 2014 12:15:35 +0000 (13:15 +0100)
wcfsetup/install/files/js/3rdParty/ckeditor/plugins/wbbcode/plugin.js

index f214a25874527d5ecc49ed2f747e24cd0440d7f5..47d03818bcf1ef03a37d19e3b3c4ccf98e561218 100644 (file)
                
                if ($.browser.mozilla) {
                        fixFirefox();
+                       
+                       // fix empty <p></p> breaking firefox
+                       var $div = $(event.editor.container.$).find('.cke_wysiwyg_div');
+                       if ($div.html() == '<p></p>') {
+                               $div.children('p').remove();
+                       }
                }
+               
+               window.dtdesign = event.editor;
+               console.debug(event.editor);
        });
        
        /**