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