Fixed support for custom block elements
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / js / 3rdParty / redactor2 / plugins / WoltLabBlock.js
index f64d35a13eae69a83b9a6c1c22516fa1ed6b882a..fece7b12d30f1b6b17d2ae3a5d84d85ace51060d 100644 (file)
@@ -30,18 +30,23 @@ $.Redactor.prototype.WoltLabBlock = function() {
                        }).bind(this);
                },
                
-               register: function(tag) {
+               register: function(tag, arrowKeySupport) {
                        if (this.block.tags.indexOf(tag) !== -1) {
                                return;
                        }
                        
                        this.block.tags.push(tag);
+                       this.opts.paragraphizeBlocks.push(tag);
                        
                        if (this.opts.blockTags.indexOf(tag) === -1) {
                                this.opts.blockTags.push(tag);
                                
                                this.reIsBlock = new RegExp('^(' + this.opts.blockTags.join('|').toUpperCase() + ')$', 'i');
                        }
+                       
+                       if (arrowKeySupport) {
+                               this.WoltLabKeydown.register(tag);
+                       }
                }
        }
 };