/*! * 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(f){"use strict";f=f&&f.hasOwnProperty("default")?f["default"]:f,Object.assign(f.DEFAULTS,{listAdvancedTypes:!0}),f.PLUGINS.lists=function(p){var d=p.$;function g(e){return'')}function m(e){return'')}function o(e,t){!function c(e,t){for(var a=[],n=0;n").concat(i.html(),""))}}(e,t);var a,n=p.html.defaultTag(),r=null;e.length&&(a="rtl"==p.opts.direction||"rtl"==d(e[0]).css("direction")?"margin-right":"margin-left");for(var o=0;o'):"<".concat(t,">"),l="");for(i-=r;0"),l+=l,i-=p.opts.indentMargin;n&&e[o].tagName.toLowerCase()==n?d(e[o]).replaceWith("".concat(s,"").concat(d(e[o]).html(),"").concat(l)):d(e[o]).wrap("".concat(s,"
  • ").concat(l))}p.clean.lists()}function i(e){var t,a;for(t=e.length-1;0<=t;t--)for(a=t-1;0<=a;a--)if(d(e[a]).find(e[t]).length||e[a]==e[t]){e.splice(t,1);break}var n=[];for(t=0;t"),r.append(g("LI")),r.prepend(m("LI"))}r.after(g(o.tagName)),"LI"==o.parentNode.tagName&&(o=o.parentNode.parentNode),n.indexOf(o)<0&&n.push(o)}for(t=0;t<\/span>/g,"")).replace(/<\/span>/g,"<$1>"),c.replaceWith(p.node.openTagString(c.get(0))+f+p.node.closeTagString(c.get(0)))}p.$el.find("li:empty").remove(),p.$el.find("ul:empty, ol:empty").remove(),p.clean.lists(),p.html.wrap()}function s(e){p.selection.save();for(var t=0;t ul, > ol").last().get(0);if(n){var r=d(document.createElement("li"));d(n).prepend(r);for(var o=p.node.contents(e[t])[0];o&&!p.node.isList(o);){var i=o.nextSibling;r.append(o),o=i}d(a).append(d(n)),d(e[t]).remove()}else{var s=d(a).find("> ul, > ol").last().get(0);if(s)d(s).append(d(e[t]));else{var l=d("<".concat(e[t].parentNode.tagName,">"));d(a).append(l),l.append(d(e[t]))}}}}p.clean.lists(),p.selection.restore()}function l(e){p.selection.save(),i(e),p.selection.restore()}function e(e){if("indent"==e||"outdent"==e){var t=!1,a=p.selection.blocks(),n=[],r=a[0].previousSibling||a[0].parentElement;if("outdent"==e){if("LI"==r.tagName||"LI"!=r.parentNode.tagName)return}else if(!a[0].previousSibling||"LI"!=a[0].previousSibling.tagName)return;for(var o=0;o