/*! * froala_editor v3.2.1 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2020 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(g){var v,t,a,m=g.$;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,g.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,g.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
g.$box.offset().left&&e
").concat(a,">")):r.before("".concat(b.MARKERS,"
")):a&&"TD"!=n.parent().get(0).tagName&&0===n.parents(a).length?n.after("<".concat(a,">").concat(b.MARKERS,"
").concat(a,">")):n.after("".concat(b.MARKERS,"
")),t.selection.restore(),g.toolbar.enable()}return{_init:function h(){if(!g.$wp)return!1;!function e(){g.shared.$line_breaker||(g.shared.$line_breaker=m(document.createElement("div")).attr("class","fr-line-breaker").html(''))),v=g.shared.$line_breaker,g.events.on("shared.destroy",function(){v.html("").removeData().remove(),v=null},!0),g.events.on("destroy",function(){v.removeData("instance").removeClass("fr-visible"),m("body").first().append(v),clearTimeout(a)},!0),g.events.$on(v,"mousemove",function(e){e.stopPropagation()},!0),g.events.bindClick(v,"a",d)}(),t=!1,g.events.$on(g.$win,"mousemove",r),g.events.$on(m(g.win),"scroll",s),g.events.on("popups.show.table.edit",s),g.events.on("commands.after",s),g.events.$on(m(g.win),"mousedown",u),g.events.$on(m(g.win),"mouseup",c)}}}});