/*! * froala_editor v3.0.3 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2019 Froala Labs */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(b){"use strict";b=b&&b.hasOwnProperty("default")?b["default"]:b,Object.assign(b.DEFAULTS,{lineBreakerTags:["table","hr","form","dl","span.fr-video",".fr-embedly","img"],lineBreakerOffset:15,lineBreakerHorizontalOffset:10}),b.PLUGINS.lineBreaker=function(c){var v,t,a,m=c.$;function f(e,t){var n,r,a,o,i,s,f,l;if(null==e)i=(o=t.parent()).offset().top,n=(f=t.offset().top)-Math.min((f-i)/2,c.opts.lineBreakerOffset),a=o.outerWidth(),r=o.offset().left;else if(null==t)(s=(o=e.parent()).offset().top+o.outerHeight())<(l=e.offset().top+e.outerHeight())&&(s=(o=m(o).parent()).offset().top+o.outerHeight()),n=l+Math.min(Math.abs(s-l)/2,c.opts.lineBreakerOffset),a=o.outerWidth(),r=o.offset().left;else{o=e.parent();var p=e.offset().top+e.height(),u=t.offset().top;if(u
c.$box.offset().left&&e
"+a+">"):r.before(b.MARKERS+"
"):a&&"TD"!=n.parent().get(0).tagName&&0===n.parents(a).length?n.after("<"+a+">"+b.MARKERS+"
"+a+">"):n.after(b.MARKERS+"
"),t.selection.restore(),c.toolbar.enable()}return{_init:function h(){if(!c.$wp)return!1;!function e(){c.shared.$line_breaker||(c.shared.$line_breaker=m(document.createElement("div")).attr("class","fr-line-breaker").html('')),v=c.shared.$line_breaker,c.events.on("shared.destroy",function(){v.html("").removeData().remove(),v=null},!0),c.events.on("destroy",function(){v.removeData("instance").removeClass("fr-visible"),m("body").first().append(v),clearTimeout(a)},!0),c.events.$on(v,"mousemove",function(e){e.stopPropagation()},!0),c.events.bindClick(v,"a",g)}(),t=!1,c.events.$on(c.$win,"mousemove",r),c.events.$on(m(c.win),"scroll",s),c.events.on("popups.show.table.edit",s),c.events.on("commands.after",s),c.events.$on(m(c.win),"mousedown",u),c.events.$on(m(c.win),"mouseup",d)}}}});