froala-editor
Version:
The next generation Javascript WYSIWYG HTML rich text editor made by devs for devs. High performance and modern design make it easy to use for developers and loved by users.
7 lines (6 loc) • 2.98 kB
JavaScript
/*!
* froala_editor v5.0.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/
* Copyright 2014-2026 Froala Labs
*/
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],a):a(("undefined"!=typeof globalThis?globalThis:e||self).FroalaEditor)}(this,function(e){"use strict";Object.assign(e.DEFAULTS,{entities:""'¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿŒœŠšŸƒˆ˜ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρςστυφχψωϑϒϖ   ‌‍‎‏–—‘’‚“”„†‡•…‰′″‹›‾⁄€ℑ℘ℜ™ℵ←↑→↓↔↵⇐⇑⇒⇓⇔∀∂∃∅∇∈∉∋∏∑−∗√∝∞∠∧∨∩∪∫∴∼≅≈≠≡≤≥⊂⊃⊄⊆⊇⊕⊗⊥⋅⌈⌉⌊⌋⟨⟩◊♠♣♥♦"}),e.PLUGINS.entities=function(i){var o,n,l=i.$;function r(e){var a=e.textContent;if(a.match(o)){for(var t="",r=0;r<a.length;r++)n[a[r]]?t+=n[a[r]]:t+=a[r];e.textContent=t}}function c(e){if(e&&0<=["STYLE","SCRIPT","svg","IFRAME"].indexOf(e.tagName))return!0;for(var a=i.node.contents(e),t=0;t<a.length;t++)(a[t].nodeType===Node.TEXT_NODE?r:c)(a[t]);return e.nodeType===Node.TEXT_NODE&&r(e),!1}var u=function u(e){return 0===e.length?"":i.clean.exec(e,c).replace(/\&/g,"&")};return{_init:function(){i.opts.htmlSimpleAmpersand||(i.opts.entities="".concat(i.opts.entities,"&"));var e=l(document.createElement("div")).html(i.opts.entities).text(),a=i.opts.entities.split(";");n={},o="";for(var t=0;t<e.length;t++){var r=e.charAt(t);n[r]="".concat(a[t],";"),o+="\\".concat(r+(t<e.length-1?"|":""))}o=new RegExp("(".concat(o,")"),"g"),i.events.on("html.get",u,!0)}}}});