Fixed undo/redo of BBCodes
authorAlexander Ebert <ebert@woltlab.com>
Wed, 25 Sep 2013 02:15:57 +0000 (04:15 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 25 Sep 2013 02:15:57 +0000 (04:15 +0200)
wcfsetup/install/files/js/3rdParty/ckeditor/plugins/wbutton/plugin.js

index 8f74534bf9e84357bb837030fe027989c89d7019..6d15c258a3ea9a31fe94344dce4e40e30dbf9dd7 100644 (file)
@@ -16,6 +16,8 @@
         * @param       CKEDITOR        editor
         */
        function transformBBCode(editor) {
+               editor.fire('lockSnapshot');
+               
                var $markerID = null;
                $(editor.container.$).find('span.wcfBBCode').removeClass('wcfBBCode').html(function() {
                        var $bbcode = $(this).data('bbcode');
@@ -34,6 +36,8 @@
                        
                        $marker.remove();
                }
+               
+               editor.fire('unlockSnapshot');
        }
        
        // listens for 'afterCommandExec' to transform BBCodes into plain text