3 lines
114 KiB
JavaScript
3 lines
114 KiB
JavaScript
|
/*! Summernote v0.8.9 | (c) 2013- Alan Hong and other contributors | MIT license */
|
||
|
|
||
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):e(t.jQuery)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e=function(){function e(t,e,o,n){this.markup=t,this.children=e,this.options=o,this.callback=n}return e.prototype.render=function(e){var o=t(this.markup);if(this.options&&this.options.contents&&o.html(this.options.contents),this.options&&this.options.className&&o.addClass(this.options.className),this.options&&this.options.data&&t.each(this.options.data,function(t,e){o.attr("data-"+t,e)}),this.options&&this.options.click&&o.on("click",this.options.click),this.children){var n=o.find(".note-children-container");this.children.forEach(function(t){t.render(n.length?n:o)})}return this.callback&&this.callback(o,this.options),this.options&&this.options.callback&&this.options.callback(o),e&&e.append(o),o},e}(),o=function(o,n){return function(){var i="object"==typeof arguments[1]?arguments[1]:arguments[0],r=t.isArray(arguments[0])?arguments[0]:[];return i&&i.children&&(r=i.children),new e(o,r,i,n)}},n=o('<div class="note-editor note-frame card"/>'),i=o('<div class="note-toolbar-wrapper"><div class="note-toolbar card-header"></div></div>'),r=o('<div class="note-editing-area"/>'),s=o('<textarea class="note-codable"/>'),a=o('<div class="note-editable card-block" contentEditable="true"/>'),l=o(['<div class="note-statusbar">',' <div class="note-resizebar">',' <div class="note-icon-bar"/>',' <div class="note-icon-bar"/>',' <div class="note-icon-bar"/>'," </div>","</div>"].join("")),c=o('<div class="note-editor"/>'),d=o('<div class="note-editable" contentEditable="true"/>'),u=o('<div class="note-btn-group btn-group">'),h=o('<div class="dropdown-menu">',function(e,o){var n=t.isArray(o.items)?o.items.map(function(t){var e="string"==typeof t?t:t.value||"",n=o.template?o.template(t):t,i="object"==typeof t?t.option:void 0;return'<a class="dropdown-item" href="#" '+('data-value="'+e+'"'+(void 0!==i?' data-option="'+i+'"':""))+">"+n+"</a>"}).join(""):o.items;e.html(n)}),p=o('<div class="dropdown-menu note-check">',function(e,o){var n=t.isArray(o.items)?o.items.map(function(t){var e="string"==typeof t?t:t.value||"",n=o.template?o.template(t):t;return'<a class="dropdown-item" href="#" data-value="'+e+'">'+b(o.checkClassName)+" "+n+"</a>"}).join(""):o.items;e.html(n)}),f=o('<div class="note-color-palette"/>',function(t,e){for(var o=[],n=0,i=e.colors.length;n<i;n++){for(var r=e.eventName,s=e.colors[n],a=[],l=0,c=s.length;l<c;l++){var d=s[l];a.push(['<button type="button" class="note-color-btn"','style="background-color:',d,'" ','data-event="',r,'" ','data-value="',d,'" ','title="',d,'" ','data-toggle="button" tabindex="-1"></button>'].join(""))}o.push('<div class="note-color-row">'+a.join("")+"</div>")}t.html(o.join("")),e.tooltip&&t.find(".note-color-btn").tooltip({container:e.container,trigger:"hover",placement:"bottom"})}),m=o('<div class="modal" aria-hidden="false" tabindex="-1"/>',function(t,e){e.fade&&t.addClass("fade"),t.html(['<div class="modal-dialog">',' <div class="modal-content">',e.title?' <div class="modal-header"> <h4 class="modal-title">'+e.title+'</h4> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> </div>':"",' <div class="modal-body">'+e.body+"</div>",e.footer?' <div class="modal-footer">'+e.footer+"</div>":""," </div>","</div>"].join(""))}),g=o(['<div class="note-popover popover in">',' <div class="arrow"/>',' <div class="popover-content note-children-container"/>',"</div>"].join(""),function(t,e){var o=void 0!==e.direction?e.direction:"bottom";t.addClass(o),e.hideArrow&&t.find(".arrow").hide()}),v=o('<label class="custom-control custom-checkbox"></label>',function(t,e){e.id&&t.attr("for",e.id),t.html([' <input type="checkbox" class="custom-control-input"'+(e.id?' id="'+e.id+'"':""),(e.checked?" checked":"")+"/>",' <span class="custom-control-indicator"></span>',' <span class="custo
|