1 $.Redactor
.prototype.WoltLabBlock = function() {
6 this.block
.tags
= ['p', 'blockquote', 'pre', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'figure'];
8 this.block
.format
= (function(tag
, attr
, value
, type
) {
9 tag
= (tag
=== 'quote') ? 'blockquote' : tag
;
11 // WoltLab modification: move list of allowed elements
12 // outside this method to allow extending it
14 //this.block.tags = ['p', 'blockquote', 'pre', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'figure'];
15 if ($.inArray(tag
, this.block
.tags
) === -1)
20 if (tag
=== 'p' && typeof attr
=== 'undefined')
26 this.placeholder
.hide();
29 return (this.utils
.isCollapsed()) ? this.block
.formatCollapsed(tag
, attr
, value
, type
) : this.block
.formatUncollapsed(tag
, attr
, value
, type
);
33 register: function(tag
) {
34 if (this.block
.tags
.indexOf(tag
) !== -1) {
38 this.block
.tags
.push(tag
);
40 if (this.opts
.blockTags
.indexOf(tag
) === -1) {
41 this.opts
.blockTags
.push(tag
);
43 this.reIsBlock
= new RegExp('^(' + this.opts
.blockTags
.join('|').toUpperCase() + ')$', 'i');