Fix for CKEditor juggling with closing link tags and line break
authorAlexander Ebert <ebert@woltlab.com>
Fri, 27 Jun 2014 19:35:25 +0000 (21:35 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 27 Jun 2014 19:35:25 +0000 (21:35 +0200)
wcfsetup/install/files/js/3rdParty/ckeditor/plugins/wbbcode/plugin.js

index 0eadb4857e22430cb972ac67623697e8f50f3903..abbb5fcc3d0d471ab4e031d80dbc9a2266670ff7 100644 (file)
                        return "[url='" + url + "']" + text + "[/url]";
                });
                
+               // fix for editor sometimes placing the closing link tag after the line break instead of before
+               html = html.replace(/\r?\n\[\/url\]/, '[/url]\n');
+               
                // [b]
                html = html.replace(/<(?:b|strong)>/gi, '[b]');
                html = html.replace(/<\/(?:b|strong)>/gi, '[/b]');