Remove cleanup redactor plugin because it breaks stuff
This commit is contained in:
parent
7f65304a69
commit
ed56c866bc
|
|
@ -1704,10 +1704,7 @@ linkProtocol="";if(text.length>this.opts.linkSize)
|
|||
text=text.substring(0,this.opts.linkSize)+'...';text=decodeURIComponent(text);var regexp=new RegExp('('+href.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")+')\\b','g');html=html.replace(regexp,'<a href="'+linkProtocol+$.trim(href)+'">'+$.trim(text)+'</a>');}}
|
||||
return html;},after:function()
|
||||
{this.observe.load();this.code.sync();}}}};$(window).on('load.tools.redactor',function()
|
||||
{$('[data-tools="redactor"]').redactor();});Redactor.prototype.init.prototype=Redactor.prototype;})(jQuery);(function($){'use strict';window.RedactorPlugins=window.RedactorPlugins||{};var Cleanup=function(redactor){this.redactor=redactor
|
||||
this.init()}
|
||||
Cleanup.prototype={init:function(){this.removeEmptyParagraphs()},removeEmptyParagraphs:function(){this.redactor.$editor.find('p').filter(function(){return!$.trim($(this).text())}).remove()}}
|
||||
window.RedactorPlugins.cleanup=function(){return{init:function(){this.cleanup=new Cleanup(this)}}}}(jQuery));(function($){'use strict';window.RedactorPlugins=window.RedactorPlugins||{};window.RedactorPlugins.fullscreen=function(){return{init:function(){this.fullscreen.isOpen=false
|
||||
{$('[data-tools="redactor"]').redactor();});Redactor.prototype.init.prototype=Redactor.prototype;})(jQuery);(function($){'use strict';window.RedactorPlugins=window.RedactorPlugins||{};window.RedactorPlugins.fullscreen=function(){return{init:function(){this.fullscreen.isOpen=false
|
||||
var button=this.button.add('fullscreen','FullScreen')
|
||||
this.button.addCallback(button,$.proxy(this.fullscreen.toggle,this))
|
||||
button.addClass('redactor_btn_fullscreen').removeClass('redactor-btn-image')
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
*
|
||||
|
||||
=require ../vendor/redactor/redactor.js
|
||||
=require plugin.cleanup.js
|
||||
=require plugin.fullscreen.js
|
||||
=require plugin.figure.js
|
||||
=require plugin.table.js
|
||||
|
|
|
|||
|
|
@ -1,37 +0,0 @@
|
|||
(function ($) {
|
||||
'use strict';
|
||||
|
||||
window.RedactorPlugins = window.RedactorPlugins || {};
|
||||
|
||||
var Cleanup = function (redactor) {
|
||||
this.redactor = redactor
|
||||
this.init()
|
||||
}
|
||||
|
||||
Cleanup.prototype = {
|
||||
|
||||
init: function () {
|
||||
this.removeEmptyParagraphs()
|
||||
},
|
||||
|
||||
/*
|
||||
* Removes empty P tags
|
||||
*/
|
||||
removeEmptyParagraphs: function () {
|
||||
this.redactor.$editor
|
||||
.find('p')
|
||||
.filter(function() { return !$.trim($(this).text()) })
|
||||
.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
window.RedactorPlugins.cleanup = function() {
|
||||
return {
|
||||
init: function () {
|
||||
this.cleanup = new Cleanup(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}(jQuery));
|
||||
Loading…
Reference in New Issue