%PDF- %PDF-
Direktori : /home/silvzytp/dsr.silveroak.website/assets/vendors/summernote/dist/ |
Current File : //home/silvzytp/dsr.silveroak.website/assets/vendors/summernote/dist/summernote-lite.js.map |
{"version":3,"file":"summernote-lite.js","sources":["../src/js/base/renderer.js","../src/js/lite/ui/TooltipUI.js","../src/js/lite/ui/DropdownUI.js","../src/js/lite/ui/ModalUI.js","../src/js/lite/ui.js","../src/js/base/summernote-en-US.js","../src/js/base/core/env.js","../src/js/base/core/func.js","../src/js/base/core/lists.js","../src/js/base/core/key.js","../src/js/base/core/dom.js","../src/js/base/core/range.js","../src/js/base/core/async.js","../src/js/base/editing/History.js","../src/js/base/editing/Style.js","../src/js/base/editing/Bullet.js","../src/js/base/editing/Typing.js","../src/js/base/editing/Table.js","../src/js/base/module/Editor.js","../src/js/base/module/Clipboard.js","../src/js/base/module/Dropzone.js","../src/js/base/module/Codeview.js","../src/js/base/module/Statusbar.js","../src/js/base/module/Fullscreen.js","../src/js/base/module/Handle.js","../src/js/base/module/AutoLink.js","../src/js/base/module/AutoSync.js","../src/js/base/module/Placeholder.js","../src/js/base/module/Buttons.js","../src/js/base/module/Toolbar.js","../src/js/base/module/LinkDialog.js","../src/js/base/module/LinkPopover.js","../src/js/base/module/ImageDialog.js","../src/js/base/module/ImagePopover.js","../src/js/base/module/TablePopover.js","../src/js/base/module/VideoDialog.js","../src/js/base/module/HelpDialog.js","../src/js/base/module/AirPopover.js","../src/js/base/module/HintPopover.js","../src/js/base/Context.js","../src/js/summernote.js","../src/js/lite/settings.js"],"sourcesContent":["import $ from 'jquery';\n\nclass Renderer {\n constructor(markup, children, options, callback) {\n this.markup = markup;\n this.children = children;\n this.options = options;\n this.callback = callback;\n }\n\n render($parent) {\n const $node = $(this.markup);\n\n if (this.options && this.options.contents) {\n $node.html(this.options.contents);\n }\n\n if (this.options && this.options.className) {\n $node.addClass(this.options.className);\n }\n\n if (this.options && this.options.data) {\n $.each(this.options.data, (k, v) => {\n $node.attr('data-' + k, v);\n });\n }\n\n if (this.options && this.options.click) {\n $node.on('click', this.options.click);\n }\n\n if (this.children) {\n const $container = $node.find('.note-children-container');\n this.children.forEach((child) => {\n child.render($container.length ? $container : $node);\n });\n }\n\n if (this.callback) {\n this.callback($node, this.options);\n }\n\n if (this.options && this.options.callback) {\n this.options.callback($node);\n }\n\n if ($parent) {\n $parent.append($node);\n }\n\n return $node;\n }\n}\n\nexport default {\n create: (markup, callback) => {\n return () => {\n const options = typeof arguments[1] === 'object' ? arguments[1] : arguments[0];\n let children = $.isArray(arguments[0]) ? arguments[0] : [];\n if (options && options.children) {\n children = options.children;\n }\n return new Renderer(markup, children, options, callback);\n };\n }\n};\n","class TooltipUI {\n constructor($node, options) {\n this.$node = $node;\n this.options = $.extend({}, {\n title: '',\n target: options.container,\n trigger: 'hover focus',\n placement: 'bottom'\n }, options);\n\n // create tooltip node\n this.$tooltip = $([\n '<div class=\"note-tooltip in\">',\n ' <div class=\"note-tooltip-arrow\"/>',\n ' <div class=\"note-tooltip-content\"/>',\n '</div>'\n ].join(''));\n\n // define event\n if (this.options.trigger !== 'manual') {\n const showCallback = this.show.bind(this);\n const hideCallback = this.hide.bind(this);\n const toggleCallback = this.toggle.bind(this);\n\n this.options.trigger.split(' ').forEach(function(eventName) {\n if (eventName === 'hover') {\n $node.off('mouseenter mouseleave');\n $node.on('mouseenter', showCallback).on('mouseleave', hideCallback);\n } else if (eventName === 'click') {\n $node.on('click', toggleCallback);\n } else if (eventName === 'focus') {\n $node.on('focus', showCallback).on('blur', hideCallback);\n }\n });\n }\n }\n\n show() {\n const $node = this.$node;\n const offset = $node.offset();\n\n const $tooltip = this.$tooltip;\n const title = this.options.title || $node.attr('title') || $node.data('title');\n const placement = this.options.placement || $node.data('placement');\n\n $tooltip.addClass(placement);\n $tooltip.addClass('in');\n $tooltip.find('.note-tooltip-content').text(title);\n $tooltip.appendTo(this.options.target);\n\n const nodeWidth = $node.outerWidth();\n const nodeHeight = $node.outerHeight();\n const tooltipWidth = $tooltip.outerWidth();\n const tooltipHeight = $tooltip.outerHeight();\n\n if (placement === 'bottom') {\n $tooltip.css({\n top: offset.top + nodeHeight,\n left: offset.left + (nodeWidth / 2 - tooltipWidth / 2)\n });\n } else if (placement === 'top') {\n $tooltip.css({\n top: offset.top - tooltipHeight,\n left: offset.left + (nodeWidth / 2 - tooltipWidth / 2)\n });\n } else if (placement === 'left') {\n $tooltip.css({\n top: offset.top + (nodeHeight / 2 - tooltipHeight / 2),\n left: offset.left - tooltipWidth\n });\n } else if (placement === 'right') {\n $tooltip.css({\n top: offset.top + (nodeHeight / 2 - tooltipHeight / 2),\n left: offset.left + nodeWidth\n });\n }\n }\n\n hide() {\n this.$tooltip.removeClass('in');\n this.$tooltip.remove();\n }\n\n toggle() {\n if (this.$tooltip.hasClass('in')) {\n this.hide();\n } else {\n this.show();\n }\n }\n}\n\nexport default TooltipUI;\n","class DropdownUI {\n constructor($node, options) {\n this.$button = $node;\n this.options = $.extend({}, {\n target: options.container\n }, options);\n this.setEvent();\n }\n\n setEvent() {\n this.$button.on('click', this.toggle.bind(this));\n }\n\n clear() {\n var $parent = $('.note-btn-group.open');\n $parent.find('.note-btn.active').removeClass('active');\n $parent.removeClass('open');\n }\n\n show() {\n this.$button.addClass('active');\n this.$button.parent().addClass('open');\n\n var $dropdown = this.$button.next();\n var offset = $dropdown.offset();\n var width = $dropdown.outerWidth();\n var windowWidth = $(window).width();\n var targetMarginRight = parseFloat($(this.options.target).css('margin-right'));\n\n if (offset.left + width > windowWidth - targetMarginRight) {\n $dropdown.css('margin-left', windowWidth - targetMarginRight - (offset.left + width));\n } else {\n $dropdown.css('margin-left', '');\n }\n }\n\n hide() {\n this.$button.removeClass('active');\n this.$button.parent().removeClass('open');\n }\n\n toggle() {\n var isOpened = this.$button.parent().hasClass('open');\n\n this.clear();\n\n if (isOpened) {\n this.hide();\n } else {\n this.show();\n }\n }\n}\n\n$(document).on('click', function(e) {\n if (!$(e.target).closest('.note-btn-group').length) {\n $('.note-btn-group.open').removeClass('open');\n }\n});\n\n$(document).on('click.note-dropdown-menu', function(e) {\n $(e.target).closest('.note-dropdown-menu').parent().removeClass('open');\n});\n\nexport default DropdownUI;\n","class ModalUI {\n constructor($node, options) {\n this.options = $.extend({}, {\n target: options.container || 'body'\n }, options);\n\n this.$modal = $node;\n this.$backdrop = $('<div class=\"note-modal-backdrop\" />');\n }\n\n show() {\n if (this.options.target === 'body') {\n this.$backdrop.css('position', 'fixed');\n this.$modal.css('position', 'fixed');\n } else {\n this.$backdrop.css('position', 'absolute');\n this.$modal.css('position', 'absolute');\n }\n\n this.$backdrop.appendTo(this.options.target).show();\n this.$modal.appendTo(this.options.target).addClass('open').show();\n\n this.$modal.trigger('note.modal.show');\n this.$modal.off('click', '.close').on('click', '.close', this.hide.bind(this));\n }\n\n hide() {\n this.$modal.removeClass('open').hide();\n this.$backdrop.hide();\n this.$modal.trigger('note.modal.hide');\n }\n}\n\nexport default ModalUI;\n","import renderer from '../base/renderer';\nimport TooltipUI from './ui/TooltipUI';\nimport DropdownUI from './ui/DropdownUI';\nimport ModalUI from './ui/ModalUI';\n\nconst editor = renderer.create('<div class=\"note-editor note-frame\"/>');\nconst toolbar = renderer.create('<div class=\"note-toolbar\"/>');\nconst editingArea = renderer.create('<div class=\"note-editing-area\"/>');\nconst codable = renderer.create('<textarea class=\"note-codable\"/>');\nconst editable = renderer.create('<div class=\"note-editable\" contentEditable=\"true\"/>');\nconst statusbar = renderer.create([\n '<div class=\"note-statusbar\">',\n ' <div class=\"note-resizebar\">',\n ' <div class=\"note-icon-bar\"/>',\n ' <div class=\"note-icon-bar\"/>',\n ' <div class=\"note-icon-bar\"/>',\n ' </div>',\n '</div>'\n].join(''));\n\nconst airEditor = renderer.create('<div class=\"note-editor\"/>');\nconst airEditable = renderer.create('<div class=\"note-editable\" contentEditable=\"true\"/>');\n\nconst buttonGroup = renderer.create('<div class=\"note-btn-group\">');\nconst button = renderer.create('<button type=\"button\" class=\"note-btn\">', function($node, options) {\n // set button type\n if (options && options.tooltip) {\n $node.data('_lite_tooltip', new TooltipUI($node, {\n title: options.tooltip,\n container: options.container\n }));\n }\n if (options.contents) {\n $node.html(options.contents);\n }\n\n if (options && options.data && options.data.toggle === 'dropdown') {\n $node.data('_lite_dropdown', new DropdownUI($node, {\n container: options.container\n }));\n }\n});\n\nconst dropdown = renderer.create('<div class=\"note-dropdown-menu\">', function($node, options) {\n const markup = $.isArray(options.items) ? options.items.map(function(item) {\n const value = (typeof item === 'string') ? item : (item.value || '');\n const content = options.template ? options.template(item) : item;\n const $temp = $('<a class=\"note-dropdown-item\" href=\"#\" data-value=\"' + value + '\"></a>');\n\n $temp.html(content).data('item', item);\n\n return $temp;\n }) : options.items;\n\n $node.html(markup);\n\n $node.on('click', '> .note-dropdown-item', function(e) {\n const $a = $(this);\n\n const item = $a.data('item');\n const value = $a.data('value');\n\n if (item.click) {\n item.click($a);\n } else if (options.itemClick) {\n options.itemClick(e, item, value);\n }\n });\n});\n\nconst dropdownCheck = renderer.create('<div class=\"note-dropdown-menu note-check\">', function($node, options) {\n const markup = $.isArray(options.items) ? options.items.map(function(item) {\n const value = (typeof item === 'string') ? item : (item.value || '');\n const content = options.template ? options.template(item) : item;\n\n const $temp = $('<a class=\"note-dropdown-item\" href=\"#\" data-value=\"' + value + '\"></a>');\n $temp.html([icon(options.checkClassName), ' ', content]).data('item', item);\n return $temp;\n }) : options.items;\n\n $node.html(markup);\n\n $node.on('click', '> .note-dropdown-item', function(e) {\n const $a = $(this);\n\n const item = $a.data('item');\n const value = $a.data('value');\n\n if (item.click) {\n item.click($a);\n } else if (options.itemClick) {\n options.itemClick(e, item, value);\n }\n });\n});\n\nconst dropdownButtonContents = function(contents, options) {\n return contents + ' ' + icon(options.icons.caret, 'span');\n};\n\nconst dropdownButton = function(opt, callback) {\n return buttonGroup([\n button({\n className: 'dropdown-toggle',\n contents: opt.title + ' ' + icon('note-icon-caret'),\n tooltip: opt.tooltip,\n data: {\n toggle: 'dropdown'\n }\n }),\n dropdown({\n className: opt.className,\n items: opt.items,\n template: opt.template,\n itemClick: opt.itemClick\n })\n ], { callback: callback }).render();\n};\n\nconst dropdownCheckButton = function(opt, callback) {\n return buttonGroup([\n button({\n className: 'dropdown-toggle',\n contents: opt.title + ' ' + icon('note-icon-caret'),\n tooltip: opt.tooltip,\n data: {\n toggle: 'dropdown'\n }\n }),\n dropdownCheck({\n className: opt.className,\n checkClassName: opt.checkClassName,\n items: opt.items,\n template: opt.template,\n itemClick: opt.itemClick\n })\n ], { callback: callback }).render();\n};\n\nconst paragraphDropdownButton = function(opt) {\n return buttonGroup([\n button({\n className: 'dropdown-toggle',\n contents: opt.title + ' ' + icon('note-icon-caret'),\n tooltip: opt.tooltip,\n data: {\n toggle: 'dropdown'\n }\n }),\n dropdown([\n buttonGroup({\n className: 'note-align',\n children: opt.items[0]\n }),\n buttonGroup({\n className: 'note-list',\n children: opt.items[1]\n })\n ])\n ]).render();\n};\n\nconst tableMoveHandler = function(event, col, row) {\n const PX_PER_EM = 18;\n const $picker = $(event.target.parentNode); // target is mousecatcher\n const $dimensionDisplay = $picker.next();\n const $catcher = $picker.find('.note-dimension-picker-mousecatcher');\n const $highlighted = $picker.find('.note-dimension-picker-highlighted');\n const $unhighlighted = $picker.find('.note-dimension-picker-unhighlighted');\n\n let posOffset;\n // HTML5 with jQuery - e.offsetX is undefined in Firefox\n if (event.offsetX === undefined) {\n const posCatcher = $(event.target).offset();\n posOffset = {\n x: event.pageX - posCatcher.left,\n y: event.pageY - posCatcher.top\n };\n } else {\n posOffset = {\n x: event.offsetX,\n y: event.offsetY\n };\n }\n\n const dim = {\n c: Math.ceil(posOffset.x / PX_PER_EM) || 1,\n r: Math.ceil(posOffset.y / PX_PER_EM) || 1\n };\n\n $highlighted.css({ width: dim.c + 'em', height: dim.r + 'em' });\n $catcher.data('value', dim.c + 'x' + dim.r);\n\n if (dim.c > 3 && dim.c < col) {\n $unhighlighted.css({ width: dim.c + 1 + 'em' });\n }\n\n if (dim.r > 3 && dim.r < row) {\n $unhighlighted.css({ height: dim.r + 1 + 'em' });\n }\n\n $dimensionDisplay.html(dim.c + ' x ' + dim.r);\n};\n\nconst tableDropdownButton = function(opt) {\n return buttonGroup([\n button({\n className: 'dropdown-toggle',\n contents: opt.title + ' ' + icon('note-icon-caret'),\n tooltip: opt.tooltip,\n data: {\n toggle: 'dropdown'\n }\n }),\n dropdown({\n className: 'note-table',\n items: [\n '<div class=\"note-dimension-picker\">',\n ' <div class=\"note-dimension-picker-mousecatcher\" data-event=\"insertTable\" data-value=\"1x1\"/>',\n ' <div class=\"note-dimension-picker-highlighted\"/>',\n ' <div class=\"note-dimension-picker-unhighlighted\"/>',\n '</div>',\n '<div class=\"note-dimension-display\">1 x 1</div>'\n ].join('')\n })\n ], {\n callback: function($node) {\n const $catcher = $node.find('.note-dimension-picker-mousecatcher');\n $catcher.css({\n width: opt.col + 'em',\n height: opt.row + 'em'\n })\n .mousedown(opt.itemClick)\n .mousemove(function(e) {\n tableMoveHandler(e, opt.col, opt.row);\n });\n }\n }).render();\n};\n\nconst palette = renderer.create('<div class=\"note-color-palette\"/>', function($node, options) {\n const contents = [];\n for (let row = 0, rowSize = options.colors.length; row < rowSize; row++) {\n const eventName = options.eventName;\n const colors = options.colors[row];\n const buttons = [];\n for (let col = 0, colSize = colors.length; col < colSize; col++) {\n const color = colors[col];\n buttons.push([\n '<button type=\"button\" class=\"note-btn note-color-btn\"',\n 'style=\"background-color:', color, '\" ',\n 'data-event=\"', eventName, '\" ',\n 'data-value=\"', color, '\" ',\n 'title=\"', color, '\" ',\n 'data-toggle=\"button\" tabindex=\"-1\"></button>'\n ].join(''));\n }\n contents.push('<div class=\"note-color-row\">' + buttons.join('') + '</div>');\n }\n $node.html(contents.join(''));\n\n $node.find('.note-color-btn').each(function() {\n $(this).data('_lite_tooltip', new TooltipUI($(this), {\n container: options.container\n }));\n });\n});\n\nconst colorDropdownButton = function(opt, type) {\n return buttonGroup({\n className: 'note-color',\n children: [\n button({\n className: 'note-current-color-button',\n contents: opt.title,\n tooltip: opt.lang.color.recent,\n click: opt.currentClick,\n callback: function($button) {\n const $recentColor = $button.find('.note-recent-color');\n\n if (type !== 'foreColor') {\n $recentColor.css('background-color', '#FFFF00');\n $button.attr('data-backColor', '#FFFF00');\n }\n }\n }),\n button({\n className: 'dropdown-toggle',\n contents: icon('note-icon-caret'),\n tooltip: opt.lang.color.more,\n data: {\n toggle: 'dropdown'\n }\n }),\n dropdown({\n items: [\n '<div>',\n '<div class=\"note-btn-group btn-background-color\">',\n ' <div class=\"note-palette-title\">' + opt.lang.color.background + '</div>',\n ' <div>',\n '<button type=\"button\" class=\"note-color-reset note-btn note-btn-block\" ' +\n ' data-event=\"backColor\" data-value=\"inherit\">',\n opt.lang.color.transparent,\n ' </button>',\n ' </div>',\n ' <div class=\"note-holder\" data-event=\"backColor\"/>',\n '</div>',\n '<div class=\"note-btn-group btn-foreground-color\">',\n ' <div class=\"note-palette-title\">' + opt.lang.color.foreground + '</div>',\n ' <div>',\n '<button type=\"button\" class=\"note-color-reset note-btn note-btn-block\" ' +\n ' data-event=\"removeFormat\" data-value=\"foreColor\">',\n opt.lang.color.resetToDefault,\n ' </button>',\n ' </div>',\n ' <div class=\"note-holder\" data-event=\"foreColor\"/>',\n '</div>',\n '</div>'\n ].join(''),\n callback: function($dropdown) {\n $dropdown.find('.note-holder').each(function() {\n const $holder = $(this);\n $holder.append(palette({\n colors: opt.colors,\n eventName: $holder.data('event')\n }).render());\n });\n\n if (type === 'fore') {\n $dropdown.find('.btn-background-color').hide();\n $dropdown.css({ 'min-width': '210px' });\n } else if (type === 'back') {\n $dropdown.find('.btn-foreground-color').hide();\n $dropdown.css({ 'min-width': '210px' });\n }\n },\n click: function(event) {\n const $button = $(event.target);\n const eventName = $button.data('event');\n const value = $button.data('value');\n\n if (eventName && value) {\n const key = eventName === 'backColor' ? 'background-color' : 'color';\n const $color = $button.closest('.note-color').find('.note-recent-color');\n const $currentButton = $button.closest('.note-color').find('.note-current-color-button');\n\n $color.css(key, value);\n $currentButton.attr('data-' + eventName, value);\n\n if (type === 'fore') {\n opt.itemClick('foreColor', value);\n } else if (type === 'back') {\n opt.itemClick('backColor', value);\n } else {\n opt.itemClick(eventName, value);\n }\n }\n }\n })\n ]\n }).render();\n};\n\nconst dialog = renderer.create('<div class=\"note-modal\" tabindex=\"-1\"/>', function($node, options) {\n if (options.fade) {\n $node.addClass('fade');\n }\n $node.html([\n ' <div class=\"note-modal-content\">',\n (options.title\n ? ' <div class=\"note-modal-header\">' +\n ' <button type=\"button\" class=\"close\"><i class=\"note-icon-close\"></i></button>' +\n ' <h4 class=\"note-modal-title\">' + options.title + '</h4>' +\n ' </div>' : ''\n ),\n ' <div class=\"note-modal-body\">' + options.body + '</div>',\n (options.footer\n ? ' <div class=\"note-modal-footer\">' + options.footer + '</div>' : ''\n ),\n ' </div>'\n ].join(''));\n\n $node.data('modal', new ModalUI($node, options));\n});\n\nconst videoDialog = function(opt) {\n const body = '<div class=\"note-form-group\">' +\n '<label class=\"note-form-label\">' +\n opt.lang.video.url + ' <small class=\"text-muted\">' +\n opt.lang.video.providers + '</small>' +\n '</label>' +\n '<input class=\"note-video-url note-input\" type=\"text\" />' +\n '</div>';\n const footer = [\n '<button type=\"button\" href=\"#\" class=\"note-btn note-btn-primary note-video-btn disabled\" disabled>',\n opt.lang.video.insert,\n '</button>'\n ].join('');\n\n return dialog({\n title: opt.lang.video.insert,\n fade: opt.fade,\n body: body,\n footer: footer\n }).render();\n};\n\nconst imageDialog = function(opt) {\n const body = '<div class=\"note-form-group note-group-select-from-files\">' +\n '<label class=\"note-form-label\">' + opt.lang.image.selectFromFiles + '</label>' +\n '<input class=\"note-note-image-input note-input\" type=\"file\" name=\"files\" accept=\"image/*\" multiple=\"multiple\" />' +\n opt.imageLimitation +\n '</div>' +\n '<div class=\"note-form-group\" style=\"overflow:auto;\">' +\n '<label class=\"note-form-label\">' + opt.lang.image.url + '</label>' +\n '<input class=\"note-image-url note-input\" type=\"text\" />' +\n '</div>';\n const footer = [\n '<button href=\"#\" type=\"button\" class=\"note-btn note-btn-primary note-btn-large note-image-btn disabled\" disabled>',\n opt.lang.image.insert,\n '</button>'\n ].join('');\n\n return dialog({\n title: opt.lang.image.insert,\n fade: opt.fade,\n body: body,\n footer: footer\n }).render();\n};\n\nconst linkDialog = function(opt) {\n const body = '<div class=\"note-form-group\">' +\n '<label class=\"note-form-label\">' + opt.lang.link.textToDisplay + '</label>' +\n '<input class=\"note-link-text note-input\" type=\"text\" />' +\n '</div>' +\n '<div class=\"note-form-group\">' +\n '<label class=\"note-form-label\">' + opt.lang.link.url + '</label>' +\n '<input class=\"note-link-url note-input\" type=\"text\" value=\"http://\" />' +\n '</div>' +\n (!opt.disableLinkTarget\n ? '<div class=\"checkbox\">' +\n '<label>' + '<input type=\"checkbox\" checked> ' + opt.lang.link.openInNewWindow + '</label>' +\n '</div>' : ''\n );\n const footer = [\n '<button href=\"#\" type=\"button\" class=\"note-btn note-btn-primary note-link-btn disabled\" disabled>',\n opt.lang.link.insert,\n '</button>'\n ].join('');\n\n return dialog({\n className: 'link-dialog',\n title: opt.lang.link.insert,\n fade: opt.fade,\n body: body,\n footer: footer\n }).render();\n};\n\nconst popover = renderer.create([\n '<div class=\"note-popover bottom\">',\n ' <div class=\"note-popover-arrow\"/>',\n ' <div class=\"note-popover-content note-children-container\"/>',\n '</div>'\n].join(''), function($node, options) {\n const direction = typeof options.direction !== 'undefined' ? options.direction : 'bottom';\n\n $node.addClass(direction).hide();\n\n if (options.hideArrow) {\n $node.find('.note-popover-arrow').hide();\n }\n});\n\nconst checkbox = renderer.create('<div class=\"checkbox\"></div>', function($node, options) {\n $node.html([\n ' <label' + (options.id ? ' for=\"' + options.id + '\"' : '') + '>',\n ' <input type=\"checkbox\"' + (options.id ? ' id=\"' + options.id + '\"' : ''),\n (options.checked ? ' checked' : '') + '/>',\n (options.text ? options.text : ''),\n '</label>'\n ].join(''));\n});\n\nconst icon = function(iconClassName, tagName) {\n tagName = tagName || 'i';\n return '<' + tagName + ' class=\"' + iconClassName + '\"/>';\n};\n\nconst ui = {\n editor: editor,\n toolbar: toolbar,\n editingArea: editingArea,\n codable: codable,\n editable: editable,\n statusbar: statusbar,\n airEditor: airEditor,\n airEditable: airEditable,\n buttonGroup: buttonGroup,\n button: button,\n dropdown: dropdown,\n dropdownCheck: dropdownCheck,\n dropdownButton: dropdownButton,\n dropdownButtonContents: dropdownButtonContents,\n dropdownCheckButton: dropdownCheckButton,\n paragraphDropdownButton: paragraphDropdownButton,\n tableDropdownButton: tableDropdownButton,\n colorDropdownButton: colorDropdownButton,\n palette: palette,\n dialog: dialog,\n videoDialog: videoDialog,\n imageDialog: imageDialog,\n linkDialog: linkDialog,\n popover: popover,\n checkbox: checkbox,\n icon: icon,\n\n toggleBtn: function($btn, isEnable) {\n $btn.toggleClass('disabled', !isEnable);\n $btn.attr('disabled', !isEnable);\n },\n\n toggleBtnActive: function($btn, isActive) {\n $btn.toggleClass('active', isActive);\n },\n\n check: function($dom, value) {\n $dom.find('.checked').removeClass('checked');\n $dom.find('[data-value=\"' + value + '\"]').addClass('checked');\n },\n\n onDialogShown: function($dialog, handler) {\n $dialog.one('note.modal.show', handler);\n },\n\n onDialogHidden: function($dialog, handler) {\n $dialog.one('note.modal.hide', handler);\n },\n\n showDialog: function($dialog) {\n $dialog.data('modal').show();\n },\n\n hideDialog: function($dialog) {\n $dialog.data('modal').hide();\n },\n\n /**\n * get popover content area\n *\n * @param $popover\n * @returns {*}\n */\n getPopoverContent: function($popover) {\n return $popover.find('.note-popover-content');\n },\n\n /**\n * get dialog's body area\n *\n * @param $dialog\n * @returns {*}\n */\n getDialogBody: function($dialog) {\n return $dialog.find('.note-modal-body');\n },\n\n createLayout: function($note, options) {\n const $editor = (options.airMode ? ui.airEditor([\n ui.editingArea([\n ui.airEditable()\n ])\n ]) : ui.editor([\n ui.toolbar(),\n ui.editingArea([\n ui.codable(),\n ui.editable()\n ]),\n ui.statusbar()\n ])).render();\n\n $editor.insertAfter($note);\n\n return {\n note: $note,\n editor: $editor,\n toolbar: $editor.find('.note-toolbar'),\n editingArea: $editor.find('.note-editing-area'),\n editable: $editor.find('.note-editable'),\n codable: $editor.find('.note-codable'),\n statusbar: $editor.find('.note-statusbar')\n };\n },\n\n removeLayout: function($note, layoutInfo) {\n $note.html(layoutInfo.editable.html());\n layoutInfo.editor.remove();\n $note.off('summernote'); // remove summernote custom event\n $note.show();\n }\n};\n\nexport default ui;\n","import $ from 'jquery';\n\n$.summernote = $.summernote || {\n lang: {}\n};\n\n$.extend($.summernote.lang, {\n 'en-US': {\n font: {\n bold: 'Bold',\n italic: 'Italic',\n underline: 'Underline',\n clear: 'Remove Font Style',\n height: 'Line Height',\n name: 'Font Family',\n strikethrough: 'Strikethrough',\n subscript: 'Subscript',\n superscript: 'Superscript',\n size: 'Font Size'\n },\n image: {\n image: 'Picture',\n insert: 'Insert Image',\n resizeFull: 'Resize Full',\n resizeHalf: 'Resize Half',\n resizeQuarter: 'Resize Quarter',\n floatLeft: 'Float Left',\n floatRight: 'Float Right',\n floatNone: 'Float None',\n shapeRounded: 'Shape: Rounded',\n shapeCircle: 'Shape: Circle',\n shapeThumbnail: 'Shape: Thumbnail',\n shapeNone: 'Shape: None',\n dragImageHere: 'Drag image or text here',\n dropImage: 'Drop image or Text',\n selectFromFiles: 'Select from files',\n maximumFileSize: 'Maximum file size',\n maximumFileSizeError: 'Maximum file size exceeded.',\n url: 'Image URL',\n remove: 'Remove Image',\n original: 'Original'\n },\n video: {\n video: 'Video',\n videoLink: 'Video Link',\n insert: 'Insert Video',\n url: 'Video URL',\n providers: '(YouTube, Vimeo, Vine, Instagram, DailyMotion or Youku)'\n },\n link: {\n link: 'Link',\n insert: 'Insert Link',\n unlink: 'Unlink',\n edit: 'Edit',\n textToDisplay: 'Text to display',\n url: 'To what URL should this link go?',\n openInNewWindow: 'Open in new window'\n },\n table: {\n table: 'Table',\n addRowAbove: 'Add row above',\n addRowBelow: 'Add row below',\n addColLeft: 'Add column left',\n addColRight: 'Add column right',\n delRow: 'Delete row',\n delCol: 'Delete column',\n delTable: 'Delete table'\n },\n hr: {\n insert: 'Insert Horizontal Rule'\n },\n style: {\n style: 'Style',\n p: 'Normal',\n blockquote: 'Quote',\n pre: 'Code',\n h1: 'Header 1',\n h2: 'Header 2',\n h3: 'Header 3',\n h4: 'Header 4',\n h5: 'Header 5',\n h6: 'Header 6'\n },\n lists: {\n unordered: 'Unordered list',\n ordered: 'Ordered list'\n },\n options: {\n help: 'Help',\n fullscreen: 'Full Screen',\n codeview: 'Code View'\n },\n paragraph: {\n paragraph: 'Paragraph',\n outdent: 'Outdent',\n indent: 'Indent',\n left: 'Align left',\n center: 'Align center',\n right: 'Align right',\n justify: 'Justify full'\n },\n color: {\n recent: 'Recent Color',\n more: 'More Color',\n background: 'Background Color',\n foreground: 'Foreground Color',\n transparent: 'Transparent',\n setTransparent: 'Set transparent',\n reset: 'Reset',\n resetToDefault: 'Reset to default'\n },\n shortcut: {\n shortcuts: 'Keyboard shortcuts',\n close: 'Close',\n textFormatting: 'Text formatting',\n action: 'Action',\n paragraphFormatting: 'Paragraph formatting',\n documentStyle: 'Document Style',\n extraKeys: 'Extra keys'\n },\n help: {\n 'insertParagraph': 'Insert Paragraph',\n 'undo': 'Undoes the last command',\n 'redo': 'Redoes the last command',\n 'tab': 'Tab',\n 'untab': 'Untab',\n 'bold': 'Set a bold style',\n 'italic': 'Set a italic style',\n 'underline': 'Set a underline style',\n 'strikethrough': 'Set a strikethrough style',\n 'removeFormat': 'Clean a style',\n 'justifyLeft': 'Set left align',\n 'justifyCenter': 'Set center align',\n 'justifyRight': 'Set right align',\n 'justifyFull': 'Set full align',\n 'insertUnorderedList': 'Toggle unordered list',\n 'insertOrderedList': 'Toggle ordered list',\n 'outdent': 'Outdent on current paragraph',\n 'indent': 'Indent on current paragraph',\n 'formatPara': 'Change current block\\'s format as a paragraph(P tag)',\n 'formatH1': 'Change current block\\'s format as H1',\n 'formatH2': 'Change current block\\'s format as H2',\n 'formatH3': 'Change current block\\'s format as H3',\n 'formatH4': 'Change current block\\'s format as H4',\n 'formatH5': 'Change current block\\'s format as H5',\n 'formatH6': 'Change current block\\'s format as H6',\n 'insertHorizontalRule': 'Insert horizontal rule',\n 'linkDialog.show': 'Show Link Dialog'\n },\n history: {\n undo: 'Undo',\n redo: 'Redo'\n },\n specialChar: {\n specialChar: 'SPECIAL CHARACTERS',\n select: 'Select Special characters'\n }\n }\n});\n","import $ from 'jquery';\nconst isSupportAmd = typeof define === 'function' && define.amd; // eslint-disable-line\n\n/**\n * returns whether font is installed or not.\n *\n * @param {String} fontName\n * @return {Boolean}\n */\nfunction isFontInstalled(fontName) {\n const testFontName = fontName === 'Comic Sans MS' ? 'Courier New' : 'Comic Sans MS';\n const $tester = $('<div>').css({\n position: 'absolute',\n left: '-9999px',\n top: '-9999px',\n fontSize: '200px'\n }).text('mmmmmmmmmwwwwwww').appendTo(document.body);\n\n const originalWidth = $tester.css('fontFamily', testFontName).width();\n const width = $tester.css('fontFamily', fontName + ',' + testFontName).width();\n\n $tester.remove();\n\n return originalWidth !== width;\n}\n\nconst userAgent = navigator.userAgent;\nconst isMSIE = /MSIE|Trident/i.test(userAgent);\nlet browserVersion;\nif (isMSIE) {\n let matches = /MSIE (\\d+[.]\\d+)/.exec(userAgent);\n if (matches) {\n browserVersion = parseFloat(matches[1]);\n }\n matches = /Trident\\/.*rv:([0-9]{1,}[.0-9]{0,})/.exec(userAgent);\n if (matches) {\n browserVersion = parseFloat(matches[1]);\n }\n}\n\nconst isEdge = /Edge\\/\\d+/.test(userAgent);\n\nlet hasCodeMirror = !!window.CodeMirror;\nif (!hasCodeMirror && isSupportAmd) {\n // Webpack\n if (typeof __webpack_require__ === 'function') { // eslint-disable-line\n try {\n // If CodeMirror can't be resolved, `require.resolve` will throw an\n // exception and `hasCodeMirror` won't be set to `true`.\n require.resolve('codemirror');\n hasCodeMirror = true;\n } catch (e) {\n // do nothing\n }\n } else if (typeof require !== 'undefined') {\n // Browserify\n if (typeof require.resolve !== 'undefined') {\n try {\n // If CodeMirror can't be resolved, `require.resolve` will throw an\n // exception and `hasCodeMirror` won't be set to `true`.\n require.resolve('codemirror');\n hasCodeMirror = true;\n } catch (e) {\n // do nothing\n }\n // Almond/Require\n } else if (typeof require.specified !== 'undefined') {\n hasCodeMirror = require.specified('codemirror');\n }\n }\n}\n\nconst isSupportTouch =\n (('ontouchstart' in window) ||\n (navigator.MaxTouchPoints > 0) ||\n (navigator.msMaxTouchPoints > 0));\n\n// [workaround] IE doesn't have input events for contentEditable\n// - see: https://goo.gl/4bfIvA\nconst inputEventName = (isMSIE || isEdge) ? 'DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted' : 'input';\n\n/**\n * @class core.env\n *\n * Object which check platform and agent\n *\n * @singleton\n * @alternateClassName env\n */\nexport default {\n isMac: navigator.appVersion.indexOf('Mac') > -1,\n isMSIE,\n isEdge,\n isFF: !isEdge && /firefox/i.test(userAgent),\n isPhantom: /PhantomJS/i.test(userAgent),\n isWebkit: !isEdge && /webkit/i.test(userAgent),\n isChrome: !isEdge && /chrome/i.test(userAgent),\n isSafari: !isEdge && /safari/i.test(userAgent),\n browserVersion,\n jqueryVersion: parseFloat($.fn.jquery),\n isSupportAmd,\n isSupportTouch,\n hasCodeMirror,\n isFontInstalled,\n isW3CRangeSupport: !!document.createRange,\n inputEventName\n};\n","/**\n * @class core.func\n *\n * func utils (for high-order func's arg)\n *\n * @singleton\n * @alternateClassName func\n */\nfunction eq(itemA) {\n return function(itemB) {\n return itemA === itemB;\n };\n}\n\nfunction eq2(itemA, itemB) {\n return itemA === itemB;\n}\n\nfunction peq2(propName) {\n return function(itemA, itemB) {\n return itemA[propName] === itemB[propName];\n };\n}\n\nfunction ok() {\n return true;\n}\n\nfunction fail() {\n return false;\n}\n\nfunction not(f) {\n return () => {\n return !f.apply(f, arguments);\n };\n}\n\nfunction and(fA, fB) {\n return function(item) {\n return fA(item) && fB(item);\n };\n}\n\nfunction self(a) {\n return a;\n}\n\nfunction invoke(obj, method) {\n return () => {\n return obj[method].apply(obj, arguments);\n };\n}\n\nlet idCounter = 0;\n\n/**\n * generate a globally-unique id\n *\n * @param {String} [prefix]\n */\nfunction uniqueId(prefix) {\n const id = ++idCounter + '';\n return prefix ? prefix + id : id;\n}\n\n/**\n * returns bnd (bounds) from rect\n *\n * - IE Compatibility Issue: http://goo.gl/sRLOAo\n * - Scroll Issue: http://goo.gl/sNjUc\n *\n * @param {Rect} rect\n * @return {Object} bounds\n * @return {Number} bounds.top\n * @return {Number} bounds.left\n * @return {Number} bounds.width\n * @return {Number} bounds.height\n */\nfunction rect2bnd(rect) {\n const $document = $(document);\n return {\n top: rect.top + $document.scrollTop(),\n left: rect.left + $document.scrollLeft(),\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n}\n\n/**\n * returns a copy of the object where the keys have become the values and the values the keys.\n * @param {Object} obj\n * @return {Object}\n */\nfunction invertObject(obj) {\n const inverted = {};\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) {\n inverted[obj[key]] = key;\n }\n }\n return inverted;\n}\n\n/**\n * @param {String} namespace\n * @param {String} [prefix]\n * @return {String}\n */\nfunction namespaceToCamel(namespace, prefix) {\n prefix = prefix || '';\n return prefix + namespace.split('.').map(function(name) {\n return name.substring(0, 1).toUpperCase() + name.substring(1);\n }).join('');\n}\n\n/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing.\n * @param {Function} func\n * @param {Number} wait\n * @param {Boolean} immediate\n * @return {Function}\n */\nfunction debounce(func, wait, immediate) {\n let timeout;\n return () => {\n const context = this;\n const args = arguments;\n const later = () => {\n timeout = null;\n if (!immediate) {\n func.apply(context, args);\n }\n };\n const callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) {\n func.apply(context, args);\n }\n };\n}\n\nexport default {\n eq,\n eq2,\n peq2,\n ok,\n fail,\n self,\n not,\n and,\n invoke,\n uniqueId,\n rect2bnd,\n invertObject,\n namespaceToCamel,\n debounce\n};\n","import $ from 'jquery';\nimport func from './func';\n\n/**\n * returns the first item of an array.\n *\n * @param {Array} array\n */\nfunction head(array) {\n return array[0];\n}\n\n/**\n * returns the last item of an array.\n *\n * @param {Array} array\n */\nfunction last(array) {\n return array[array.length - 1];\n}\n\n/**\n * returns everything but the last entry of the array.\n *\n * @param {Array} array\n */\nfunction initial(array) {\n return array.slice(0, array.length - 1);\n}\n\n/**\n * returns the rest of the items in an array.\n *\n * @param {Array} array\n */\nfunction tail(array) {\n return array.slice(1);\n}\n\n/**\n * returns item of array\n */\nfunction find(array, pred) {\n for (let idx = 0, len = array.length; idx < len; idx++) {\n const item = array[idx];\n if (pred(item)) {\n return item;\n }\n }\n}\n\n/**\n * returns true if all of the values in the array pass the predicate truth test.\n */\nfunction all(array, pred) {\n for (let idx = 0, len = array.length; idx < len; idx++) {\n if (!pred(array[idx])) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * returns index of item\n */\nfunction indexOf(array, item) {\n return $.inArray(item, array);\n}\n\n/**\n * returns true if the value is present in the list.\n */\nfunction contains(array, item) {\n return indexOf(array, item) !== -1;\n}\n\n/**\n * get sum from a list\n *\n * @param {Array} array - array\n * @param {Function} fn - iterator\n */\nfunction sum(array, fn) {\n fn = fn || func.self;\n return array.reduce(function(memo, v) {\n return memo + fn(v);\n }, 0);\n}\n\n/**\n * returns a copy of the collection with array type.\n * @param {Collection} collection - collection eg) node.childNodes, ...\n */\nfunction from(collection) {\n const result = [];\n const length = collection.length;\n let idx = -1;\n while (++idx < length) {\n result[idx] = collection[idx];\n }\n return result;\n}\n\n/**\n * returns whether list is empty or not\n */\nfunction isEmpty(array) {\n return !array || !array.length;\n}\n\n/**\n * cluster elements by predicate function.\n *\n * @param {Array} array - array\n * @param {Function} fn - predicate function for cluster rule\n * @param {Array[]}\n */\nfunction clusterBy(array, fn) {\n if (!array.length) { return []; }\n const aTail = tail(array);\n return aTail.reduce(function(memo, v) {\n const aLast = last(memo);\n if (fn(last(aLast), v)) {\n aLast[aLast.length] = v;\n } else {\n memo[memo.length] = [v];\n }\n return memo;\n }, [[head(array)]]);\n}\n\n/**\n * returns a copy of the array with all false values removed\n *\n * @param {Array} array - array\n * @param {Function} fn - predicate function for cluster rule\n */\nfunction compact(array) {\n const aResult = [];\n for (let idx = 0, len = array.length; idx < len; idx++) {\n if (array[idx]) { aResult.push(array[idx]); }\n }\n return aResult;\n}\n\n/**\n * produces a duplicate-free version of the array\n *\n * @param {Array} array\n */\nfunction unique(array) {\n const results = [];\n\n for (let idx = 0, len = array.length; idx < len; idx++) {\n if (!contains(results, array[idx])) {\n results.push(array[idx]);\n }\n }\n\n return results;\n}\n\n/**\n * returns next item.\n * @param {Array} array\n */\nfunction next(array, item) {\n const idx = indexOf(array, item);\n if (idx === -1) { return null; }\n\n return array[idx + 1];\n}\n\n/**\n * returns prev item.\n * @param {Array} array\n */\nfunction prev(array, item) {\n const idx = indexOf(array, item);\n if (idx === -1) { return null; }\n\n return array[idx - 1];\n}\n\n/**\n * @class core.list\n *\n * list utils\n *\n * @singleton\n * @alternateClassName list\n */\nexport default {\n head,\n last,\n initial,\n tail,\n prev,\n next,\n find,\n contains,\n all,\n sum,\n from,\n isEmpty,\n clusterBy,\n compact,\n unique\n};\n","import lists from './lists';\nimport func from './func';\n\nconst KEY_MAP = {\n 'BACKSPACE': 8,\n 'TAB': 9,\n 'ENTER': 13,\n 'SPACE': 32,\n 'DELETE': 46,\n\n // Arrow\n 'LEFT': 37,\n 'UP': 38,\n 'RIGHT': 39,\n 'DOWN': 40,\n\n // Number: 0-9\n 'NUM0': 48,\n 'NUM1': 49,\n 'NUM2': 50,\n 'NUM3': 51,\n 'NUM4': 52,\n 'NUM5': 53,\n 'NUM6': 54,\n 'NUM7': 55,\n 'NUM8': 56,\n\n // Alphabet: a-z\n 'B': 66,\n 'E': 69,\n 'I': 73,\n 'J': 74,\n 'K': 75,\n 'L': 76,\n 'R': 82,\n 'S': 83,\n 'U': 85,\n 'V': 86,\n 'Y': 89,\n 'Z': 90,\n\n 'SLASH': 191,\n 'LEFTBRACKET': 219,\n 'BACKSLASH': 220,\n 'RIGHTBRACKET': 221\n};\n\n/**\n * @class core.key\n *\n * Object for keycodes.\n *\n * @singleton\n * @alternateClassName key\n */\nexport default {\n /**\n * @method isEdit\n *\n * @param {Number} keyCode\n * @return {Boolean}\n */\n isEdit: (keyCode) => {\n return lists.contains([\n KEY_MAP.BACKSPACE,\n KEY_MAP.TAB,\n KEY_MAP.ENTER,\n KEY_MAP.SPACE,\n KEY_MAP.DELETE\n ], keyCode);\n },\n /**\n * @method isMove\n *\n * @param {Number} keyCode\n * @return {Boolean}\n */\n isMove: (keyCode) => {\n return lists.contains([\n KEY_MAP.LEFT,\n KEY_MAP.UP,\n KEY_MAP.RIGHT,\n KEY_MAP.DOWN\n ], keyCode);\n },\n /**\n * @property {Object} nameFromCode\n * @property {String} nameFromCode.8 \"BACKSPACE\"\n */\n nameFromCode: func.invertObject(KEY_MAP),\n code: KEY_MAP\n};\n","import $ from 'jquery';\nimport func from './func';\nimport lists from './lists';\nimport env from './env';\n\nconst NBSP_CHAR = String.fromCharCode(160);\nconst ZERO_WIDTH_NBSP_CHAR = '\\ufeff';\n\n/**\n * @method isEditable\n *\n * returns whether node is `note-editable` or not.\n *\n * @param {Node} node\n * @return {Boolean}\n */\nfunction isEditable(node) {\n return node && $(node).hasClass('note-editable');\n}\n\n/**\n * @method isControlSizing\n *\n * returns whether node is `note-control-sizing` or not.\n *\n * @param {Node} node\n * @return {Boolean}\n */\nfunction isControlSizing(node) {\n return node && $(node).hasClass('note-control-sizing');\n}\n\n/**\n * @method makePredByNodeName\n *\n * returns predicate which judge whether nodeName is same\n *\n * @param {String} nodeName\n * @return {Function}\n */\nfunction makePredByNodeName(nodeName) {\n nodeName = nodeName.toUpperCase();\n return function(node) {\n return node && node.nodeName.toUpperCase() === nodeName;\n };\n}\n\n/**\n * @method isText\n *\n *\n *\n * @param {Node} node\n * @return {Boolean} true if node's type is text(3)\n */\nfunction isText(node) {\n return node && node.nodeType === 3;\n}\n\n/**\n * @method isElement\n *\n *\n *\n * @param {Node} node\n * @return {Boolean} true if node's type is element(1)\n */\nfunction isElement(node) {\n return node && node.nodeType === 1;\n}\n\n/**\n * ex) br, col, embed, hr, img, input, ...\n * @see http://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements\n */\nfunction isVoid(node) {\n return node && /^BR|^IMG|^HR|^IFRAME|^BUTTON|^INPUT/.test(node.nodeName.toUpperCase());\n}\n\nfunction isPara(node) {\n if (isEditable(node)) {\n return false;\n }\n\n // Chrome(v31.0), FF(v25.0.1) use DIV for paragraph\n return node && /^DIV|^P|^LI|^H[1-7]/.test(node.nodeName.toUpperCase());\n}\n\nfunction isHeading(node) {\n return node && /^H[1-7]/.test(node.nodeName.toUpperCase());\n}\n\nconst isPre = makePredByNodeName('PRE');\n\nconst isLi = makePredByNodeName('LI');\n\nfunction isPurePara(node) {\n return isPara(node) && !isLi(node);\n}\n\nconst isTable = makePredByNodeName('TABLE');\n\nconst isData = makePredByNodeName('DATA');\n\nfunction isInline(node) {\n return !isBodyContainer(node) &&\n !isList(node) &&\n !isHr(node) &&\n !isPara(node) &&\n !isTable(node) &&\n !isBlockquote(node) &&\n !isData(node);\n}\n\nfunction isList(node) {\n return node && /^UL|^OL/.test(node.nodeName.toUpperCase());\n}\n\nconst isHr = makePredByNodeName('HR');\n\nfunction isCell(node) {\n return node && /^TD|^TH/.test(node.nodeName.toUpperCase());\n}\n\nconst isBlockquote = makePredByNodeName('BLOCKQUOTE');\n\nfunction isBodyContainer(node) {\n return isCell(node) || isBlockquote(node) || isEditable(node);\n}\n\nconst isAnchor = makePredByNodeName('A');\n\nfunction isParaInline(node) {\n return isInline(node) && !!ancestor(node, isPara);\n}\n\nfunction isBodyInline(node) {\n return isInline(node) && !ancestor(node, isPara);\n}\n\nconst isBody = makePredByNodeName('BODY');\n\n/**\n * returns whether nodeB is closest sibling of nodeA\n *\n * @param {Node} nodeA\n * @param {Node} nodeB\n * @return {Boolean}\n */\nfunction isClosestSibling(nodeA, nodeB) {\n return nodeA.nextSibling === nodeB ||\n nodeA.previousSibling === nodeB;\n}\n\n/**\n * returns array of closest siblings with node\n *\n * @param {Node} node\n * @param {function} [pred] - predicate function\n * @return {Node[]}\n */\nfunction withClosestSiblings(node, pred) {\n pred = pred || func.ok;\n\n const siblings = [];\n if (node.previousSibling && pred(node.previousSibling)) {\n siblings.push(node.previousSibling);\n }\n siblings.push(node);\n if (node.nextSibling && pred(node.nextSibling)) {\n siblings.push(node.nextSibling);\n }\n return siblings;\n}\n\n/**\n * blank HTML for cursor position\n * - [workaround] old IE only works with \n * - [workaround] IE11 and other browser works with bogus br\n */\nconst blankHTML = env.isMSIE && env.browserVersion < 11 ? ' ' : '<br>';\n\n/**\n * @method nodeLength\n *\n * returns #text's text size or element's childNodes size\n *\n * @param {Node} node\n */\nfunction nodeLength(node) {\n if (isText(node)) {\n return node.nodeValue.length;\n }\n\n if (node) {\n return node.childNodes.length;\n }\n\n return 0;\n}\n\n/**\n * returns whether node is empty or not.\n *\n * @param {Node} node\n * @return {Boolean}\n */\nfunction isEmpty(node) {\n const len = nodeLength(node);\n\n if (len === 0) {\n return true;\n } else if (!isText(node) && len === 1 && node.innerHTML === blankHTML) {\n // ex) <p><br></p>, <span><br></span>\n return true;\n } else if (lists.all(node.childNodes, isText) && node.innerHTML === '') {\n // ex) <p></p>, <span></span>\n return true;\n }\n\n return false;\n}\n\n/**\n * padding blankHTML if node is empty (for cursor position)\n */\nfunction paddingBlankHTML(node) {\n if (!isVoid(node) && !nodeLength(node)) {\n node.innerHTML = blankHTML;\n }\n}\n\n/**\n * find nearest ancestor predicate hit\n *\n * @param {Node} node\n * @param {Function} pred - predicate function\n */\nfunction ancestor(node, pred) {\n while (node) {\n if (pred(node)) { return node; }\n if (isEditable(node)) { break; }\n\n node = node.parentNode;\n }\n return null;\n}\n\n/**\n * find nearest ancestor only single child blood line and predicate hit\n *\n * @param {Node} node\n * @param {Function} pred - predicate function\n */\nfunction singleChildAncestor(node, pred) {\n node = node.parentNode;\n\n while (node) {\n if (nodeLength(node) !== 1) { break; }\n if (pred(node)) { return node; }\n if (isEditable(node)) { break; }\n\n node = node.parentNode;\n }\n return null;\n}\n\n/**\n * returns new array of ancestor nodes (until predicate hit).\n *\n * @param {Node} node\n * @param {Function} [optional] pred - predicate function\n */\nfunction listAncestor(node, pred) {\n pred = pred || func.fail;\n\n const ancestors = [];\n ancestor(node, function(el) {\n if (!isEditable(el)) {\n ancestors.push(el);\n }\n\n return pred(el);\n });\n return ancestors;\n}\n\n/**\n * find farthest ancestor predicate hit\n */\nfunction lastAncestor(node, pred) {\n const ancestors = listAncestor(node);\n return lists.last(ancestors.filter(pred));\n}\n\n/**\n * returns common ancestor node between two nodes.\n *\n * @param {Node} nodeA\n * @param {Node} nodeB\n */\nfunction commonAncestor(nodeA, nodeB) {\n const ancestors = listAncestor(nodeA);\n for (let n = nodeB; n; n = n.parentNode) {\n if ($.inArray(n, ancestors) > -1) { return n; }\n }\n return null; // difference document area\n}\n\n/**\n * listing all previous siblings (until predicate hit).\n *\n * @param {Node} node\n * @param {Function} [optional] pred - predicate function\n */\nfunction listPrev(node, pred) {\n pred = pred || func.fail;\n\n const nodes = [];\n while (node) {\n if (pred(node)) { break; }\n nodes.push(node);\n node = node.previousSibling;\n }\n return nodes;\n}\n\n/**\n * listing next siblings (until predicate hit).\n *\n * @param {Node} node\n * @param {Function} [pred] - predicate function\n */\nfunction listNext(node, pred) {\n pred = pred || func.fail;\n\n const nodes = [];\n while (node) {\n if (pred(node)) { break; }\n nodes.push(node);\n node = node.nextSibling;\n }\n return nodes;\n}\n\n/**\n * listing descendant nodes\n *\n * @param {Node} node\n * @param {Function} [pred] - predicate function\n */\nfunction listDescendant(node, pred) {\n const descendants = [];\n pred = pred || func.ok;\n\n // start DFS(depth first search) with node\n (function fnWalk(current) {\n if (node !== current && pred(current)) {\n descendants.push(current);\n }\n for (let idx = 0, len = current.childNodes.length; idx < len; idx++) {\n fnWalk(current.childNodes[idx]);\n }\n })(node);\n\n return descendants;\n}\n\n/**\n * wrap node with new tag.\n *\n * @param {Node} node\n * @param {Node} tagName of wrapper\n * @return {Node} - wrapper\n */\nfunction wrap(node, wrapperName) {\n const parent = node.parentNode;\n const wrapper = $('<' + wrapperName + '>')[0];\n\n parent.insertBefore(wrapper, node);\n wrapper.appendChild(node);\n\n return wrapper;\n}\n\n/**\n * insert node after preceding\n *\n * @param {Node} node\n * @param {Node} preceding - predicate function\n */\nfunction insertAfter(node, preceding) {\n const next = preceding.nextSibling;\n let parent = preceding.parentNode;\n if (next) {\n parent.insertBefore(node, next);\n } else {\n parent.appendChild(node);\n }\n return node;\n}\n\n/**\n * append elements.\n *\n * @param {Node} node\n * @param {Collection} aChild\n */\nfunction appendChildNodes(node, aChild) {\n $.each(aChild, function(idx, child) {\n node.appendChild(child);\n });\n return node;\n}\n\n/**\n * returns whether boundaryPoint is left edge or not.\n *\n * @param {BoundaryPoint} point\n * @return {Boolean}\n */\nfunction isLeftEdgePoint(point) {\n return point.offset === 0;\n}\n\n/**\n * returns whether boundaryPoint is right edge or not.\n *\n * @param {BoundaryPoint} point\n * @return {Boolean}\n */\nfunction isRightEdgePoint(point) {\n return point.offset === nodeLength(point.node);\n}\n\n/**\n * returns whether boundaryPoint is edge or not.\n *\n * @param {BoundaryPoint} point\n * @return {Boolean}\n */\nfunction isEdgePoint(point) {\n return isLeftEdgePoint(point) || isRightEdgePoint(point);\n}\n\n/**\n * returns whether node is left edge of ancestor or not.\n *\n * @param {Node} node\n * @param {Node} ancestor\n * @return {Boolean}\n */\nfunction isLeftEdgeOf(node, ancestor) {\n while (node && node !== ancestor) {\n if (position(node) !== 0) {\n return false;\n }\n node = node.parentNode;\n }\n\n return true;\n}\n\n/**\n * returns whether node is right edge of ancestor or not.\n *\n * @param {Node} node\n * @param {Node} ancestor\n * @return {Boolean}\n */\nfunction isRightEdgeOf(node, ancestor) {\n if (!ancestor) {\n return false;\n }\n while (node && node !== ancestor) {\n if (position(node) !== nodeLength(node.parentNode) - 1) {\n return false;\n }\n node = node.parentNode;\n }\n\n return true;\n}\n\n/**\n * returns whether point is left edge of ancestor or not.\n * @param {BoundaryPoint} point\n * @param {Node} ancestor\n * @return {Boolean}\n */\nfunction isLeftEdgePointOf(point, ancestor) {\n return isLeftEdgePoint(point) && isLeftEdgeOf(point.node, ancestor);\n}\n\n/**\n * returns whether point is right edge of ancestor or not.\n * @param {BoundaryPoint} point\n * @param {Node} ancestor\n * @return {Boolean}\n */\nfunction isRightEdgePointOf(point, ancestor) {\n return isRightEdgePoint(point) && isRightEdgeOf(point.node, ancestor);\n}\n\n/**\n * returns offset from parent.\n *\n * @param {Node} node\n */\nfunction position(node) {\n let offset = 0;\n while ((node = node.previousSibling)) {\n offset += 1;\n }\n return offset;\n}\n\nfunction hasChildren(node) {\n return !!(node && node.childNodes && node.childNodes.length);\n}\n\n/**\n * returns previous boundaryPoint\n *\n * @param {BoundaryPoint} point\n * @param {Boolean} isSkipInnerOffset\n * @return {BoundaryPoint}\n */\nfunction prevPoint(point, isSkipInnerOffset) {\n let node;\n let offset;\n\n if (point.offset === 0) {\n if (isEditable(point.node)) {\n return null;\n }\n\n node = point.node.parentNode;\n offset = position(point.node);\n } else if (hasChildren(point.node)) {\n node = point.node.childNodes[point.offset - 1];\n offset = nodeLength(node);\n } else {\n node = point.node;\n offset = isSkipInnerOffset ? 0 : point.offset - 1;\n }\n\n return {\n node: node,\n offset: offset\n };\n}\n\n/**\n * returns next boundaryPoint\n *\n * @param {BoundaryPoint} point\n * @param {Boolean} isSkipInnerOffset\n * @return {BoundaryPoint}\n */\nfunction nextPoint(point, isSkipInnerOffset) {\n let node, offset;\n\n if (nodeLength(point.node) === point.offset) {\n if (isEditable(point.node)) {\n return null;\n }\n\n node = point.node.parentNode;\n offset = position(point.node) + 1;\n } else if (hasChildren(point.node)) {\n node = point.node.childNodes[point.offset];\n offset = 0;\n } else {\n node = point.node;\n offset = isSkipInnerOffset ? nodeLength(point.node) : point.offset + 1;\n }\n\n return {\n node: node,\n offset: offset\n };\n}\n\n/**\n * returns whether pointA and pointB is same or not.\n *\n * @param {BoundaryPoint} pointA\n * @param {BoundaryPoint} pointB\n * @return {Boolean}\n */\nfunction isSamePoint(pointA, pointB) {\n return pointA.node === pointB.node && pointA.offset === pointB.offset;\n}\n\n/**\n * returns whether point is visible (can set cursor) or not.\n *\n * @param {BoundaryPoint} point\n * @return {Boolean}\n */\nfunction isVisiblePoint(point) {\n if (isText(point.node) || !hasChildren(point.node) || isEmpty(point.node)) {\n return true;\n }\n\n const leftNode = point.node.childNodes[point.offset - 1];\n const rightNode = point.node.childNodes[point.offset];\n if ((!leftNode || isVoid(leftNode)) && (!rightNode || isVoid(rightNode))) {\n return true;\n }\n\n return false;\n}\n\n/**\n * @method prevPointUtil\n *\n * @param {BoundaryPoint} point\n * @param {Function} pred\n * @return {BoundaryPoint}\n */\nfunction prevPointUntil(point, pred) {\n while (point) {\n if (pred(point)) {\n return point;\n }\n\n point = prevPoint(point);\n }\n\n return null;\n}\n\n/**\n * @method nextPointUntil\n *\n * @param {BoundaryPoint} point\n * @param {Function} pred\n * @return {BoundaryPoint}\n */\nfunction nextPointUntil(point, pred) {\n while (point) {\n if (pred(point)) {\n return point;\n }\n\n point = nextPoint(point);\n }\n\n return null;\n}\n\n/**\n * returns whether point has character or not.\n *\n * @param {Point} point\n * @return {Boolean}\n */\nfunction isCharPoint(point) {\n if (!isText(point.node)) {\n return false;\n }\n\n const ch = point.node.nodeValue.charAt(point.offset - 1);\n return ch && (ch !== ' ' && ch !== NBSP_CHAR);\n}\n\n/**\n * @method walkPoint\n *\n * @param {BoundaryPoint} startPoint\n * @param {BoundaryPoint} endPoint\n * @param {Function} handler\n * @param {Boolean} isSkipInnerOffset\n */\nfunction walkPoint(startPoint, endPoint, handler, isSkipInnerOffset) {\n let point = startPoint;\n\n while (point) {\n handler(point);\n\n if (isSamePoint(point, endPoint)) {\n break;\n }\n\n const isSkipOffset = isSkipInnerOffset &&\n startPoint.node !== point.node &&\n endPoint.node !== point.node;\n point = nextPoint(point, isSkipOffset);\n }\n}\n\n/**\n * @method makeOffsetPath\n *\n * return offsetPath(array of offset) from ancestor\n *\n * @param {Node} ancestor - ancestor node\n * @param {Node} node\n */\nfunction makeOffsetPath(ancestor, node) {\n const ancestors = listAncestor(node, func.eq(ancestor));\n return ancestors.map(position).reverse();\n}\n\n/**\n * @method fromOffsetPath\n *\n * return element from offsetPath(array of offset)\n *\n * @param {Node} ancestor - ancestor node\n * @param {array} offsets - offsetPath\n */\nfunction fromOffsetPath(ancestor, offsets) {\n let current = ancestor;\n for (let i = 0, len = offsets.length; i < len; i++) {\n if (current.childNodes.length <= offsets[i]) {\n current = current.childNodes[current.childNodes.length - 1];\n } else {\n current = current.childNodes[offsets[i]];\n }\n }\n return current;\n}\n\n/**\n * @method splitNode\n *\n * split element or #text\n *\n * @param {BoundaryPoint} point\n * @param {Object} [options]\n * @param {Boolean} [options.isSkipPaddingBlankHTML] - default: false\n * @param {Boolean} [options.isNotSplitEdgePoint] - default: false\n * @return {Node} right node of boundaryPoint\n */\nfunction splitNode(point, options) {\n const isSkipPaddingBlankHTML = options && options.isSkipPaddingBlankHTML;\n const isNotSplitEdgePoint = options && options.isNotSplitEdgePoint;\n\n // edge case\n if (isEdgePoint(point) && (isText(point.node) || isNotSplitEdgePoint)) {\n if (isLeftEdgePoint(point)) {\n return point.node;\n } else if (isRightEdgePoint(point)) {\n return point.node.nextSibling;\n }\n }\n\n // split #text\n if (isText(point.node)) {\n return point.node.splitText(point.offset);\n } else {\n const childNode = point.node.childNodes[point.offset];\n const clone = insertAfter(point.node.cloneNode(false), point.node);\n appendChildNodes(clone, listNext(childNode));\n\n if (!isSkipPaddingBlankHTML) {\n paddingBlankHTML(point.node);\n paddingBlankHTML(clone);\n }\n\n return clone;\n }\n}\n\n/**\n * @method splitTree\n *\n * split tree by point\n *\n * @param {Node} root - split root\n * @param {BoundaryPoint} point\n * @param {Object} [options]\n * @param {Boolean} [options.isSkipPaddingBlankHTML] - default: false\n * @param {Boolean} [options.isNotSplitEdgePoint] - default: false\n * @return {Node} right node of boundaryPoint\n */\nfunction splitTree(root, point, options) {\n // ex) [#text, <span>, <p>]\n const ancestors = listAncestor(point.node, func.eq(root));\n\n if (!ancestors.length) {\n return null;\n } else if (ancestors.length === 1) {\n return splitNode(point, options);\n }\n\n return ancestors.reduce(function(node, parent) {\n if (node === point.node) {\n node = splitNode(point, options);\n }\n\n return splitNode({\n node: parent,\n offset: node ? position(node) : nodeLength(parent)\n }, options);\n });\n}\n\n/**\n * split point\n *\n * @param {Point} point\n * @param {Boolean} isInline\n * @return {Object}\n */\nfunction splitPoint(point, isInline) {\n // find splitRoot, container\n // - inline: splitRoot is a child of paragraph\n // - block: splitRoot is a child of bodyContainer\n const pred = isInline ? isPara : isBodyContainer;\n const ancestors = listAncestor(point.node, pred);\n const topAncestor = lists.last(ancestors) || point.node;\n\n let splitRoot, container;\n if (pred(topAncestor)) {\n splitRoot = ancestors[ancestors.length - 2];\n container = topAncestor;\n } else {\n splitRoot = topAncestor;\n container = splitRoot.parentNode;\n }\n\n // if splitRoot is exists, split with splitTree\n let pivot = splitRoot && splitTree(splitRoot, point, {\n isSkipPaddingBlankHTML: isInline,\n isNotSplitEdgePoint: isInline\n });\n\n // if container is point.node, find pivot with point.offset\n if (!pivot && container === point.node) {\n pivot = point.node.childNodes[point.offset];\n }\n\n return {\n rightNode: pivot,\n container: container\n };\n}\n\nfunction create(nodeName) {\n return document.createElement(nodeName);\n}\n\nfunction createText(text) {\n return document.createTextNode(text);\n}\n\n/**\n * @method remove\n *\n * remove node, (isRemoveChild: remove child or not)\n *\n * @param {Node} node\n * @param {Boolean} isRemoveChild\n */\nfunction remove(node, isRemoveChild) {\n if (!node || !node.parentNode) { return; }\n if (node.removeNode) { return node.removeNode(isRemoveChild); }\n\n const parent = node.parentNode;\n if (!isRemoveChild) {\n const nodes = [];\n for (let i = 0, len = node.childNodes.length; i < len; i++) {\n nodes.push(node.childNodes[i]);\n }\n\n for (let i = 0, len = nodes.length; i < len; i++) {\n parent.insertBefore(nodes[i], node);\n }\n }\n\n parent.removeChild(node);\n}\n\n/**\n * @method removeWhile\n *\n * @param {Node} node\n * @param {Function} pred\n */\nfunction removeWhile(node, pred) {\n while (node) {\n if (isEditable(node) || !pred(node)) {\n break;\n }\n\n const parent = node.parentNode;\n remove(node);\n node = parent;\n }\n}\n\n/**\n * @method replace\n *\n * replace node with provided nodeName\n *\n * @param {Node} node\n * @param {String} nodeName\n * @return {Node} - new node\n */\nfunction replace(node, nodeName) {\n if (node.nodeName.toUpperCase() === nodeName.toUpperCase()) {\n return node;\n }\n\n const newNode = create(nodeName);\n\n if (node.style.cssText) {\n newNode.style.cssText = node.style.cssText;\n }\n\n appendChildNodes(newNode, lists.from(node.childNodes));\n insertAfter(newNode, node);\n remove(node);\n\n return newNode;\n}\n\nconst isTextarea = makePredByNodeName('TEXTAREA');\n\n/**\n * @param {jQuery} $node\n * @param {Boolean} [stripLinebreaks] - default: false\n */\nfunction value($node, stripLinebreaks) {\n const val = isTextarea($node[0]) ? $node.val() : $node.html();\n if (stripLinebreaks) {\n return val.replace(/[\\n\\r]/g, '');\n }\n return val;\n}\n\n/**\n * @method html\n *\n * get the HTML contents of node\n *\n * @param {jQuery} $node\n * @param {Boolean} [isNewlineOnBlock]\n */\nfunction html($node, isNewlineOnBlock) {\n let markup = value($node);\n\n if (isNewlineOnBlock) {\n const regexTag = /<(\\/?)(\\b(?!!)[^>\\s]*)(.*?)(\\s*\\/?>)/g;\n markup = markup.replace(regexTag, function(match, endSlash, name) {\n name = name.toUpperCase();\n const isEndOfInlineContainer = /^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(name) &&\n !!endSlash;\n const isBlockNode = /^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(name);\n\n return match + ((isEndOfInlineContainer || isBlockNode) ? '\\n' : '');\n });\n markup = $.trim(markup);\n }\n\n return markup;\n}\n\nfunction posFromPlaceholder(placeholder) {\n const $placeholder = $(placeholder);\n const pos = $placeholder.offset();\n const height = $placeholder.outerHeight(true); // include margin\n\n return {\n left: pos.left,\n top: pos.top + height\n };\n}\n\nfunction attachEvents($node, events) {\n Object.keys(events).forEach(function(key) {\n $node.on(key, events[key]);\n });\n}\n\nfunction detachEvents($node, events) {\n Object.keys(events).forEach(function(key) {\n $node.off(key, events[key]);\n });\n}\n\n/**\n * @method isCustomStyleTag\n *\n * assert if a node contains a \"note-styletag\" class,\n * which implies that's a custom-made style tag node\n *\n * @param {Node} an HTML DOM node\n */\nfunction isCustomStyleTag(node) {\n return node && !isText(node) && lists.contains(node.classList, 'note-styletag');\n}\n\nexport default {\n /** @property {String} NBSP_CHAR */\n NBSP_CHAR,\n /** @property {String} ZERO_WIDTH_NBSP_CHAR */\n ZERO_WIDTH_NBSP_CHAR,\n /** @property {String} blank */\n blank: blankHTML,\n /** @property {String} emptyPara */\n emptyPara: `<p>${blankHTML}</p>`,\n makePredByNodeName,\n isEditable,\n isControlSizing,\n isText,\n isElement,\n isVoid,\n isPara,\n isPurePara,\n isHeading,\n isInline,\n isBlock: func.not(isInline),\n isBodyInline,\n isBody,\n isParaInline,\n isPre,\n isList,\n isTable,\n isData,\n isCell,\n isBlockquote,\n isBodyContainer,\n isAnchor,\n isDiv: makePredByNodeName('DIV'),\n isLi,\n isBR: makePredByNodeName('BR'),\n isSpan: makePredByNodeName('SPAN'),\n isB: makePredByNodeName('B'),\n isU: makePredByNodeName('U'),\n isS: makePredByNodeName('S'),\n isI: makePredByNodeName('I'),\n isImg: makePredByNodeName('IMG'),\n isTextarea,\n isEmpty,\n isEmptyAnchor: func.and(isAnchor, isEmpty),\n isClosestSibling,\n withClosestSiblings,\n nodeLength,\n isLeftEdgePoint,\n isRightEdgePoint,\n isEdgePoint,\n isLeftEdgeOf,\n isRightEdgeOf,\n isLeftEdgePointOf,\n isRightEdgePointOf,\n prevPoint,\n nextPoint,\n isSamePoint,\n isVisiblePoint,\n prevPointUntil,\n nextPointUntil,\n isCharPoint,\n walkPoint,\n ancestor,\n singleChildAncestor,\n listAncestor,\n lastAncestor,\n listNext,\n listPrev,\n listDescendant,\n commonAncestor,\n wrap,\n insertAfter,\n appendChildNodes,\n position,\n hasChildren,\n makeOffsetPath,\n fromOffsetPath,\n splitTree,\n splitPoint,\n create,\n createText,\n remove,\n removeWhile,\n replace,\n html,\n value,\n posFromPlaceholder,\n attachEvents,\n detachEvents,\n isCustomStyleTag\n};\n","import $ from 'jquery';\nimport env from './env';\nimport func from './func';\nimport lists from './lists';\nimport dom from './dom';\n\n/**\n * return boundaryPoint from TextRange, inspired by Andy Na's HuskyRange.js\n *\n * @param {TextRange} textRange\n * @param {Boolean} isStart\n * @return {BoundaryPoint}\n *\n * @see http://msdn.microsoft.com/en-us/library/ie/ms535872(v=vs.85).aspx\n */\nfunction textRangeToPoint(textRange, isStart) {\n let container = textRange.parentElement();\n let offset;\n\n const tester = document.body.createTextRange();\n let prevContainer;\n const childNodes = lists.from(container.childNodes);\n for (offset = 0; offset < childNodes.length; offset++) {\n if (dom.isText(childNodes[offset])) {\n continue;\n }\n tester.moveToElementText(childNodes[offset]);\n if (tester.compareEndPoints('StartToStart', textRange) >= 0) {\n break;\n }\n prevContainer = childNodes[offset];\n }\n\n if (offset !== 0 && dom.isText(childNodes[offset - 1])) {\n const textRangeStart = document.body.createTextRange();\n let curTextNode = null;\n textRangeStart.moveToElementText(prevContainer || container);\n textRangeStart.collapse(!prevContainer);\n curTextNode = prevContainer ? prevContainer.nextSibling : container.firstChild;\n\n const pointTester = textRange.duplicate();\n pointTester.setEndPoint('StartToStart', textRangeStart);\n let textCount = pointTester.text.replace(/[\\r\\n]/g, '').length;\n\n while (textCount > curTextNode.nodeValue.length && curTextNode.nextSibling) {\n textCount -= curTextNode.nodeValue.length;\n curTextNode = curTextNode.nextSibling;\n }\n\n // [workaround] enforce IE to re-reference curTextNode, hack\n const dummy = curTextNode.nodeValue; // eslint-disable-line\n\n if (isStart && curTextNode.nextSibling && dom.isText(curTextNode.nextSibling) &&\n textCount === curTextNode.nodeValue.length) {\n textCount -= curTextNode.nodeValue.length;\n curTextNode = curTextNode.nextSibling;\n }\n\n container = curTextNode;\n offset = textCount;\n }\n\n return {\n cont: container,\n offset: offset\n };\n}\n\n/**\n * return TextRange from boundary point (inspired by google closure-library)\n * @param {BoundaryPoint} point\n * @return {TextRange}\n */\nfunction pointToTextRange(point) {\n const textRangeInfo = function(container, offset) {\n let node, isCollapseToStart;\n\n if (dom.isText(container)) {\n const prevTextNodes = dom.listPrev(container, func.not(dom.isText));\n const prevContainer = lists.last(prevTextNodes).previousSibling;\n node = prevContainer || container.parentNode;\n offset += lists.sum(lists.tail(prevTextNodes), dom.nodeLength);\n isCollapseToStart = !prevContainer;\n } else {\n node = container.childNodes[offset] || container;\n if (dom.isText(node)) {\n return textRangeInfo(node, 0);\n }\n\n offset = 0;\n isCollapseToStart = false;\n }\n\n return {\n node: node,\n collapseToStart: isCollapseToStart,\n offset: offset\n };\n };\n\n const textRange = document.body.createTextRange();\n const info = textRangeInfo(point.node, point.offset);\n\n textRange.moveToElementText(info.node);\n textRange.collapse(info.collapseToStart);\n textRange.moveStart('character', info.offset);\n return textRange;\n}\n\n/**\n * Wrapped Range\n *\n * @constructor\n * @param {Node} sc - start container\n * @param {Number} so - start offset\n * @param {Node} ec - end container\n * @param {Number} eo - end offset\n */\nclass WrappedRange {\n constructor(sc, so, ec, eo) {\n this.sc = sc;\n this.so = so;\n this.ec = ec;\n this.eo = eo;\n\n // isOnEditable: judge whether range is on editable or not\n this.isOnEditable = this.makeIsOn(dom.isEditable);\n // isOnList: judge whether range is on list node or not\n this.isOnList = this.makeIsOn(dom.isList);\n // isOnAnchor: judge whether range is on anchor node or not\n this.isOnAnchor = this.makeIsOn(dom.isAnchor);\n // isOnCell: judge whether range is on cell node or not\n this.isOnCell = this.makeIsOn(dom.isCell);\n // isOnData: judge whether range is on data node or not\n this.isOnData = this.makeIsOn(dom.isData);\n }\n\n // nativeRange: get nativeRange from sc, so, ec, eo\n nativeRange() {\n if (env.isW3CRangeSupport) {\n const w3cRange = document.createRange();\n w3cRange.setStart(this.sc, this.so);\n w3cRange.setEnd(this.ec, this.eo);\n\n return w3cRange;\n } else {\n const textRange = pointToTextRange({\n node: this.sc,\n offset: this.so\n });\n\n textRange.setEndPoint('EndToEnd', pointToTextRange({\n node: this.ec,\n offset: this.eo\n }));\n\n return textRange;\n }\n }\n\n getPoints() {\n return {\n sc: this.sc,\n so: this.so,\n ec: this.ec,\n eo: this.eo\n };\n }\n\n getStartPoint() {\n return {\n node: this.sc,\n offset: this.so\n };\n }\n\n getEndPoint() {\n return {\n node: this.ec,\n offset: this.eo\n };\n }\n\n /**\n * select update visible range\n */\n select() {\n const nativeRng = this.nativeRange();\n if (env.isW3CRangeSupport) {\n const selection = document.getSelection();\n if (selection.rangeCount > 0) {\n selection.removeAllRanges();\n }\n selection.addRange(nativeRng);\n } else {\n nativeRng.select();\n }\n\n return this;\n }\n\n /**\n * Moves the scrollbar to start container(sc) of current range\n *\n * @return {WrappedRange}\n */\n scrollIntoView(container) {\n const height = $(container).height();\n if (container.scrollTop + height < this.sc.offsetTop) {\n container.scrollTop += Math.abs(container.scrollTop + height - this.sc.offsetTop);\n }\n\n return this;\n }\n\n /**\n * @return {WrappedRange}\n */\n normalize() {\n /**\n * @param {BoundaryPoint} point\n * @param {Boolean} isLeftToRight\n * @return {BoundaryPoint}\n */\n const getVisiblePoint = function(point, isLeftToRight) {\n if ((dom.isVisiblePoint(point) && !dom.isEdgePoint(point)) ||\n (dom.isVisiblePoint(point) && dom.isRightEdgePoint(point) && !isLeftToRight) ||\n (dom.isVisiblePoint(point) && dom.isLeftEdgePoint(point) && isLeftToRight) ||\n (dom.isVisiblePoint(point) && dom.isBlock(point.node) && dom.isEmpty(point.node))) {\n return point;\n }\n\n // point on block's edge\n const block = dom.ancestor(point.node, dom.isBlock);\n if (((dom.isLeftEdgePointOf(point, block) || dom.isVoid(dom.prevPoint(point).node)) && !isLeftToRight) ||\n ((dom.isRightEdgePointOf(point, block) || dom.isVoid(dom.nextPoint(point).node)) && isLeftToRight)) {\n // returns point already on visible point\n if (dom.isVisiblePoint(point)) {\n return point;\n }\n // reverse direction\n isLeftToRight = !isLeftToRight;\n }\n\n const nextPoint = isLeftToRight ? dom.nextPointUntil(dom.nextPoint(point), dom.isVisiblePoint)\n : dom.prevPointUntil(dom.prevPoint(point), dom.isVisiblePoint);\n return nextPoint || point;\n };\n\n const endPoint = getVisiblePoint(this.getEndPoint(), false);\n const startPoint = this.isCollapsed() ? endPoint : getVisiblePoint(this.getStartPoint(), true);\n\n return new WrappedRange(\n startPoint.node,\n startPoint.offset,\n endPoint.node,\n endPoint.offset\n );\n }\n\n /**\n * returns matched nodes on range\n *\n * @param {Function} [pred] - predicate function\n * @param {Object} [options]\n * @param {Boolean} [options.includeAncestor]\n * @param {Boolean} [options.fullyContains]\n * @return {Node[]}\n */\n nodes(pred, options) {\n pred = pred || func.ok;\n\n const includeAncestor = options && options.includeAncestor;\n const fullyContains = options && options.fullyContains;\n\n // TODO compare points and sort\n const startPoint = this.getStartPoint();\n const endPoint = this.getEndPoint();\n\n const nodes = [];\n const leftEdgeNodes = [];\n\n dom.walkPoint(startPoint, endPoint, function(point) {\n if (dom.isEditable(point.node)) {\n return;\n }\n\n let node;\n if (fullyContains) {\n if (dom.isLeftEdgePoint(point)) {\n leftEdgeNodes.push(point.node);\n }\n if (dom.isRightEdgePoint(point) && lists.contains(leftEdgeNodes, point.node)) {\n node = point.node;\n }\n } else if (includeAncestor) {\n node = dom.ancestor(point.node, pred);\n } else {\n node = point.node;\n }\n\n if (node && pred(node)) {\n nodes.push(node);\n }\n }, true);\n\n return lists.unique(nodes);\n }\n\n /**\n * returns commonAncestor of range\n * @return {Element} - commonAncestor\n */\n commonAncestor() {\n return dom.commonAncestor(this.sc, this.ec);\n }\n\n /**\n * returns expanded range by pred\n *\n * @param {Function} pred - predicate function\n * @return {WrappedRange}\n */\n expand(pred) {\n const startAncestor = dom.ancestor(this.sc, pred);\n const endAncestor = dom.ancestor(this.ec, pred);\n\n if (!startAncestor && !endAncestor) {\n return new WrappedRange(this.sc, this.so, this.ec, this.eo);\n }\n\n const boundaryPoints = this.getPoints();\n\n if (startAncestor) {\n boundaryPoints.sc = startAncestor;\n boundaryPoints.so = 0;\n }\n\n if (endAncestor) {\n boundaryPoints.ec = endAncestor;\n boundaryPoints.eo = dom.nodeLength(endAncestor);\n }\n\n return new WrappedRange(\n boundaryPoints.sc,\n boundaryPoints.so,\n boundaryPoints.ec,\n boundaryPoints.eo\n );\n }\n\n /**\n * @param {Boolean} isCollapseToStart\n * @return {WrappedRange}\n */\n collapse(isCollapseToStart) {\n if (isCollapseToStart) {\n return new WrappedRange(this.sc, this.so, this.sc, this.so);\n } else {\n return new WrappedRange(this.ec, this.eo, this.ec, this.eo);\n }\n }\n\n /**\n * splitText on range\n */\n splitText() {\n const isSameContainer = this.sc === this.ec;\n const boundaryPoints = this.getPoints();\n\n if (dom.isText(this.ec) && !dom.isEdgePoint(this.getEndPoint())) {\n this.ec.splitText(this.eo);\n }\n\n if (dom.isText(this.sc) && !dom.isEdgePoint(this.getStartPoint())) {\n boundaryPoints.sc = this.sc.splitText(this.so);\n boundaryPoints.so = 0;\n\n if (isSameContainer) {\n boundaryPoints.ec = boundaryPoints.sc;\n boundaryPoints.eo = this.eo - this.so;\n }\n }\n\n return new WrappedRange(\n boundaryPoints.sc,\n boundaryPoints.so,\n boundaryPoints.ec,\n boundaryPoints.eo\n );\n }\n\n /**\n * delete contents on range\n * @return {WrappedRange}\n */\n deleteContents() {\n if (this.isCollapsed()) {\n return this;\n }\n\n const rng = this.splitText();\n const nodes = rng.nodes(null, {\n fullyContains: true\n });\n\n // find new cursor point\n const point = dom.prevPointUntil(rng.getStartPoint(), function(point) {\n return !lists.contains(nodes, point.node);\n });\n\n const emptyParents = [];\n $.each(nodes, function(idx, node) {\n // find empty parents\n const parent = node.parentNode;\n if (point.node !== parent && dom.nodeLength(parent) === 1) {\n emptyParents.push(parent);\n }\n dom.remove(node, false);\n });\n\n // remove empty parents\n $.each(emptyParents, function(idx, node) {\n dom.remove(node, false);\n });\n\n return new WrappedRange(\n point.node,\n point.offset,\n point.node,\n point.offset\n ).normalize();\n }\n\n /**\n * makeIsOn: return isOn(pred) function\n */\n makeIsOn(pred) {\n return function() {\n const ancestor = dom.ancestor(this.sc, pred);\n return !!ancestor && (ancestor === dom.ancestor(this.ec, pred));\n };\n }\n\n /**\n * @param {Function} pred\n * @return {Boolean}\n */\n isLeftEdgeOf(pred) {\n if (!dom.isLeftEdgePoint(this.getStartPoint())) {\n return false;\n }\n\n const node = dom.ancestor(this.sc, pred);\n return node && dom.isLeftEdgeOf(this.sc, node);\n }\n\n /**\n * returns whether range was collapsed or not\n */\n isCollapsed() {\n return this.sc === this.ec && this.so === this.eo;\n }\n\n /**\n * wrap inline nodes which children of body with paragraph\n *\n * @return {WrappedRange}\n */\n wrapBodyInlineWithPara() {\n if (dom.isBodyContainer(this.sc) && dom.isEmpty(this.sc)) {\n this.sc.innerHTML = dom.emptyPara;\n return new WrappedRange(this.sc.firstChild, 0, this.sc.firstChild, 0);\n }\n\n /**\n * [workaround] firefox often create range on not visible point. so normalize here.\n * - firefox: |<p>text</p>|\n * - chrome: <p>|text|</p>\n */\n const rng = this.normalize();\n if (dom.isParaInline(this.sc) || dom.isPara(this.sc)) {\n return rng;\n }\n\n // find inline top ancestor\n let topAncestor;\n if (dom.isInline(rng.sc)) {\n const ancestors = dom.listAncestor(rng.sc, func.not(dom.isInline));\n topAncestor = lists.last(ancestors);\n if (!dom.isInline(topAncestor)) {\n topAncestor = ancestors[ancestors.length - 2] || rng.sc.childNodes[rng.so];\n }\n } else {\n topAncestor = rng.sc.childNodes[rng.so > 0 ? rng.so - 1 : 0];\n }\n\n // siblings not in paragraph\n let inlineSiblings = dom.listPrev(topAncestor, dom.isParaInline).reverse();\n inlineSiblings = inlineSiblings.concat(dom.listNext(topAncestor.nextSibling, dom.isParaInline));\n\n // wrap with paragraph\n if (inlineSiblings.length) {\n const para = dom.wrap(lists.head(inlineSiblings), 'p');\n dom.appendChildNodes(para, lists.tail(inlineSiblings));\n }\n\n return this.normalize();\n }\n\n /**\n * insert node at current cursor\n *\n * @param {Node} node\n * @return {Node}\n */\n insertNode(node) {\n const rng = this.wrapBodyInlineWithPara().deleteContents();\n const info = dom.splitPoint(rng.getStartPoint(), dom.isInline(node));\n\n if (info.rightNode) {\n info.rightNode.parentNode.insertBefore(node, info.rightNode);\n } else {\n info.container.appendChild(node);\n }\n\n return node;\n }\n\n /**\n * insert html at current cursor\n */\n pasteHTML(markup) {\n const contentsContainer = $('<div></div>').html(markup)[0];\n const childNodes = lists.from(contentsContainer.childNodes);\n\n const rng = this.wrapBodyInlineWithPara().deleteContents();\n\n return childNodes.reverse().map(function(childNode) {\n return rng.insertNode(childNode);\n }).reverse();\n }\n\n /**\n * returns text in range\n *\n * @return {String}\n */\n toString() {\n const nativeRng = this.nativeRange();\n return env.isW3CRangeSupport ? nativeRng.toString() : nativeRng.text;\n }\n\n /**\n * returns range for word before cursor\n *\n * @param {Boolean} [findAfter] - find after cursor, default: false\n * @return {WrappedRange}\n */\n getWordRange(findAfter) {\n let endPoint = this.getEndPoint();\n\n if (!dom.isCharPoint(endPoint)) {\n return this;\n }\n\n const startPoint = dom.prevPointUntil(endPoint, function(point) {\n return !dom.isCharPoint(point);\n });\n\n if (findAfter) {\n endPoint = dom.nextPointUntil(endPoint, function(point) {\n return !dom.isCharPoint(point);\n });\n }\n\n return new WrappedRange(\n startPoint.node,\n startPoint.offset,\n endPoint.node,\n endPoint.offset\n );\n }\n\n /**\n * create offsetPath bookmark\n *\n * @param {Node} editable\n */\n bookmark(editable) {\n return {\n s: {\n path: dom.makeOffsetPath(editable, this.sc),\n offset: this.so\n },\n e: {\n path: dom.makeOffsetPath(editable, this.ec),\n offset: this.eo\n }\n };\n }\n\n /**\n * create offsetPath bookmark base on paragraph\n *\n * @param {Node[]} paras\n */\n paraBookmark(paras) {\n return {\n s: {\n path: lists.tail(dom.makeOffsetPath(lists.head(paras), this.sc)),\n offset: this.so\n },\n e: {\n path: lists.tail(dom.makeOffsetPath(lists.last(paras), this.ec)),\n offset: this.eo\n }\n };\n }\n\n /**\n * getClientRects\n * @return {Rect[]}\n */\n getClientRects() {\n const nativeRng = this.nativeRange();\n return nativeRng.getClientRects();\n }\n}\n\n/**\n * Data structure\n * * BoundaryPoint: a point of dom tree\n * * BoundaryPoints: two boundaryPoints corresponding to the start and the end of the Range\n *\n * See to http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-Position\n */\nexport default {\n /**\n * create Range Object From arguments or Browser Selection\n *\n * @param {Node} sc - start container\n * @param {Number} so - start offset\n * @param {Node} ec - end container\n * @param {Number} eo - end offset\n * @return {WrappedRange}\n */\n create: function(sc, so, ec, eo) {\n if (arguments.length === 4) {\n return new WrappedRange(sc, so, ec, eo);\n } else if (arguments.length === 2) { // collapsed\n ec = sc;\n eo = so;\n return new WrappedRange(sc, so, ec, eo);\n } else {\n let wrappedRange = this.createFromSelection();\n if (!wrappedRange && arguments.length === 1) {\n wrappedRange = this.createFromNode(arguments[0]);\n return wrappedRange.collapse(dom.emptyPara === arguments[0].innerHTML);\n }\n return wrappedRange;\n }\n },\n\n createFromSelection: function() {\n let sc, so, ec, eo;\n if (env.isW3CRangeSupport) {\n const selection = document.getSelection();\n if (!selection || selection.rangeCount === 0) {\n return null;\n } else if (dom.isBody(selection.anchorNode)) {\n // Firefox: returns entire body as range on initialization.\n // We won't never need it.\n return null;\n }\n\n const nativeRng = selection.getRangeAt(0);\n sc = nativeRng.startContainer;\n so = nativeRng.startOffset;\n ec = nativeRng.endContainer;\n eo = nativeRng.endOffset;\n } else { // IE8: TextRange\n const textRange = document.selection.createRange();\n const textRangeEnd = textRange.duplicate();\n textRangeEnd.collapse(false);\n const textRangeStart = textRange;\n textRangeStart.collapse(true);\n\n let startPoint = textRangeToPoint(textRangeStart, true);\n let endPoint = textRangeToPoint(textRangeEnd, false);\n\n // same visible point case: range was collapsed.\n if (dom.isText(startPoint.node) && dom.isLeftEdgePoint(startPoint) &&\n dom.isTextNode(endPoint.node) && dom.isRightEdgePoint(endPoint) &&\n endPoint.node.nextSibling === startPoint.node) {\n startPoint = endPoint;\n }\n\n sc = startPoint.cont;\n so = startPoint.offset;\n ec = endPoint.cont;\n eo = endPoint.offset;\n }\n\n return new WrappedRange(sc, so, ec, eo);\n },\n\n /**\n * @method\n *\n * create WrappedRange from node\n *\n * @param {Node} node\n * @return {WrappedRange}\n */\n createFromNode: function(node) {\n let sc = node;\n let so = 0;\n let ec = node;\n let eo = dom.nodeLength(ec);\n\n // browsers can't target a picture or void node\n if (dom.isVoid(sc)) {\n so = dom.listPrev(sc).length - 1;\n sc = sc.parentNode;\n }\n if (dom.isBR(ec)) {\n eo = dom.listPrev(ec).length - 1;\n ec = ec.parentNode;\n } else if (dom.isVoid(ec)) {\n eo = dom.listPrev(ec).length;\n ec = ec.parentNode;\n }\n\n return this.create(sc, so, ec, eo);\n },\n\n /**\n * create WrappedRange from node after position\n *\n * @param {Node} node\n * @return {WrappedRange}\n */\n createFromNodeBefore: function(node) {\n return this.createFromNode(node).collapse(true);\n },\n\n /**\n * create WrappedRange from node after position\n *\n * @param {Node} node\n * @return {WrappedRange}\n */\n createFromNodeAfter: function(node) {\n return this.createFromNode(node).collapse();\n },\n\n /**\n * @method\n *\n * create WrappedRange from bookmark\n *\n * @param {Node} editable\n * @param {Object} bookmark\n * @return {WrappedRange}\n */\n createFromBookmark: function(editable, bookmark) {\n const sc = dom.fromOffsetPath(editable, bookmark.s.path);\n const so = bookmark.s.offset;\n const ec = dom.fromOffsetPath(editable, bookmark.e.path);\n const eo = bookmark.e.offset;\n return new WrappedRange(sc, so, ec, eo);\n },\n\n /**\n * @method\n *\n * create WrappedRange from paraBookmark\n *\n * @param {Object} bookmark\n * @param {Node[]} paras\n * @return {WrappedRange}\n */\n createFromParaBookmark: function(bookmark, paras) {\n const so = bookmark.s.offset;\n const eo = bookmark.e.offset;\n const sc = dom.fromOffsetPath(lists.head(paras), bookmark.s.path);\n const ec = dom.fromOffsetPath(lists.last(paras), bookmark.e.path);\n\n return new WrappedRange(sc, so, ec, eo);\n }\n};\n","import $ from 'jquery';\n\n/**\n * @method readFileAsDataURL\n *\n * read contents of file as representing URL\n *\n * @param {File} file\n * @return {Promise} - then: dataUrl\n */\nexport function readFileAsDataURL(file) {\n return $.Deferred((deferred) => {\n $.extend(new FileReader(), {\n onload: (e) => {\n const dataURL = e.target.result;\n deferred.resolve(dataURL);\n },\n onerror: (err) => {\n deferred.reject(err);\n }\n }).readAsDataURL(file);\n }).promise();\n}\n\n/**\n * @method createImage\n *\n * create `<image>` from url string\n *\n * @param {String} url\n * @return {Promise} - then: $image\n */\nexport function createImage(url) {\n return $.Deferred((deferred) => {\n const $img = $('<img>');\n\n $img.one('load', () => {\n $img.off('error abort');\n deferred.resolve($img);\n }).one('error abort', () => {\n $img.off('load').detach();\n deferred.reject($img);\n }).css({\n display: 'none'\n }).appendTo(document.body).attr('src', url);\n }).promise();\n}\n","import range from '../core/range';\n\nexport default class History {\n constructor($editable) {\n this.stack = [];\n this.stackOffset = -1;\n this.$editable = $editable;\n this.editable = $editable[0];\n }\n\n makeSnapshot() {\n const rng = range.create(this.editable);\n const emptyBookmark = {s: {path: [], offset: 0}, e: {path: [], offset: 0}};\n\n return {\n contents: this.$editable.html(),\n bookmark: (rng ? rng.bookmark(this.editable) : emptyBookmark)\n };\n }\n\n applySnapshot(snapshot) {\n if (snapshot.contents !== null) {\n this.$editable.html(snapshot.contents);\n }\n if (snapshot.bookmark !== null) {\n range.createFromBookmark(this.editable, snapshot.bookmark).select();\n }\n }\n\n /**\n * @method rewind\n * Rewinds the history stack back to the first snapshot taken.\n * Leaves the stack intact, so that \"Redo\" can still be used.\n */\n rewind() {\n // Create snap shot if not yet recorded\n if (this.$editable.html() !== this.stack[this.stackOffset].contents) {\n this.recordUndo();\n }\n\n // Return to the first available snapshot.\n this.stackOffset = 0;\n\n // Apply that snapshot.\n this.applySnapshot(this.stack[this.stackOffset]);\n }\n\n /**\n * @method reset\n * Resets the history stack completely; reverting to an empty editor.\n */\n reset() {\n // Clear the stack.\n this.stack = [];\n\n // Restore stackOffset to its original value.\n this.stackOffset = -1;\n\n // Clear the editable area.\n this.$editable.html('');\n\n // Record our first snapshot (of nothing).\n this.recordUndo();\n }\n\n /**\n * undo\n */\n undo() {\n // Create snap shot if not yet recorded\n if (this.$editable.html() !== this.stack[this.stackOffset].contents) {\n this.recordUndo();\n }\n\n if (this.stackOffset > 0) {\n this.stackOffset--;\n this.applySnapshot(this.stack[this.stackOffset]);\n }\n }\n\n /**\n * redo\n */\n redo() {\n if (this.stack.length - 1 > this.stackOffset) {\n this.stackOffset++;\n this.applySnapshot(this.stack[this.stackOffset]);\n }\n }\n\n /**\n * recorded undo\n */\n recordUndo() {\n this.stackOffset++;\n\n // Wash out stack after stackOffset\n if (this.stack.length > this.stackOffset) {\n this.stack = this.stack.slice(0, this.stackOffset);\n }\n\n // Create new snapshot and push it to the end\n this.stack.push(this.makeSnapshot());\n }\n}\n","import $ from 'jquery';\nimport env from '../core/env';\nimport func from '../core/func';\nimport lists from '../core/lists';\nimport dom from '../core/dom';\n\nexport default class Style {\n /**\n * @method jQueryCSS\n *\n * [workaround] for old jQuery\n * passing an array of style properties to .css()\n * will result in an object of property-value pairs.\n * (compability with version < 1.9)\n *\n * @private\n * @param {jQuery} $obj\n * @param {Array} propertyNames - An array of one or more CSS properties.\n * @return {Object}\n */\n jQueryCSS($obj, propertyNames) {\n if (env.jqueryVersion < 1.9) {\n const result = {};\n $.each(propertyNames, (idx, propertyName) => {\n result[propertyName] = $obj.css(propertyName);\n });\n return result;\n }\n return $obj.css(propertyNames);\n }\n\n /**\n * returns style object from node\n *\n * @param {jQuery} $node\n * @return {Object}\n */\n fromNode($node) {\n const properties = ['font-family', 'font-size', 'text-align', 'list-style-type', 'line-height'];\n const styleInfo = this.jQueryCSS($node, properties) || {};\n styleInfo['font-size'] = parseInt(styleInfo['font-size'], 10);\n return styleInfo;\n }\n\n /**\n * paragraph level style\n *\n * @param {WrappedRange} rng\n * @param {Object} styleInfo\n */\n stylePara(rng, styleInfo) {\n $.each(rng.nodes(dom.isPara, {\n includeAncestor: true\n }), (idx, para) => {\n $(para).css(styleInfo);\n });\n }\n\n /**\n * insert and returns styleNodes on range.\n *\n * @param {WrappedRange} rng\n * @param {Object} [options] - options for styleNodes\n * @param {String} [options.nodeName] - default: `SPAN`\n * @param {Boolean} [options.expandClosestSibling] - default: `false`\n * @param {Boolean} [options.onlyPartialContains] - default: `false`\n * @return {Node[]}\n */\n styleNodes(rng, options) {\n rng = rng.splitText();\n\n const nodeName = (options && options.nodeName) || 'SPAN';\n const expandClosestSibling = !!(options && options.expandClosestSibling);\n const onlyPartialContains = !!(options && options.onlyPartialContains);\n\n if (rng.isCollapsed()) {\n return [rng.insertNode(dom.create(nodeName))];\n }\n\n let pred = dom.makePredByNodeName(nodeName);\n const nodes = rng.nodes(dom.isText, {\n fullyContains: true\n }).map((text) => {\n return dom.singleChildAncestor(text, pred) || dom.wrap(text, nodeName);\n });\n\n if (expandClosestSibling) {\n if (onlyPartialContains) {\n const nodesInRange = rng.nodes();\n // compose with partial contains predication\n pred = func.and(pred, (node) => {\n return lists.contains(nodesInRange, node);\n });\n }\n\n return nodes.map((node) => {\n const siblings = dom.withClosestSiblings(node, pred);\n const head = lists.head(siblings);\n const tails = lists.tail(siblings);\n $.each(tails, (idx, elem) => {\n dom.appendChildNodes(head, elem.childNodes);\n dom.remove(elem);\n });\n return lists.head(siblings);\n });\n } else {\n return nodes;\n }\n }\n\n /**\n * get current style on cursor\n *\n * @param {WrappedRange} rng\n * @return {Object} - object contains style properties.\n */\n current(rng) {\n const $cont = $(!dom.isElement(rng.sc) ? rng.sc.parentNode : rng.sc);\n let styleInfo = this.fromNode($cont);\n\n // document.queryCommandState for toggle state\n // [workaround] prevent Firefox nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"\n try {\n styleInfo = $.extend(styleInfo, {\n 'font-bold': document.queryCommandState('bold') ? 'bold' : 'normal',\n 'font-italic': document.queryCommandState('italic') ? 'italic' : 'normal',\n 'font-underline': document.queryCommandState('underline') ? 'underline' : 'normal',\n 'font-subscript': document.queryCommandState('subscript') ? 'subscript' : 'normal',\n 'font-superscript': document.queryCommandState('superscript') ? 'superscript' : 'normal',\n 'font-strikethrough': document.queryCommandState('strikethrough') ? 'strikethrough' : 'normal',\n 'font-family': document.queryCommandValue('fontname') || styleInfo['font-family']\n });\n } catch (e) {}\n\n // list-style-type to list-style(unordered, ordered)\n if (!rng.isOnList()) {\n styleInfo['list-style'] = 'none';\n } else {\n const orderedTypes = ['circle', 'disc', 'disc-leading-zero', 'square'];\n const isUnordered = $.inArray(styleInfo['list-style-type'], orderedTypes) > -1;\n styleInfo['list-style'] = isUnordered ? 'unordered' : 'ordered';\n }\n\n const para = dom.ancestor(rng.sc, dom.isPara);\n if (para && para.style['line-height']) {\n styleInfo['line-height'] = para.style.lineHeight;\n } else {\n const lineHeight = parseInt(styleInfo['line-height'], 10) / parseInt(styleInfo['font-size'], 10);\n styleInfo['line-height'] = lineHeight.toFixed(1);\n }\n\n styleInfo.anchor = rng.isOnAnchor() && dom.ancestor(rng.sc, dom.isAnchor);\n styleInfo.ancestors = dom.listAncestor(rng.sc, dom.isEditable);\n styleInfo.range = rng;\n\n return styleInfo;\n }\n}\n","import $ from 'jquery';\nimport lists from '../core/lists';\nimport func from '../core/func';\nimport dom from '../core/dom';\nimport range from '../core/range';\n\nexport default class Bullet {\n /**\n * toggle ordered list\n */\n insertOrderedList(editable) {\n this.toggleList('OL', editable);\n }\n\n /**\n * toggle unordered list\n */\n insertUnorderedList(editable) {\n this.toggleList('UL', editable);\n }\n\n /**\n * indent\n */\n indent(editable) {\n const rng = range.create(editable).wrapBodyInlineWithPara();\n\n const paras = rng.nodes(dom.isPara, { includeAncestor: true });\n const clustereds = lists.clusterBy(paras, func.peq2('parentNode'));\n\n $.each(clustereds, (idx, paras) => {\n const head = lists.head(paras);\n if (dom.isLi(head)) {\n this.wrapList(paras, head.parentNode.nodeName);\n } else {\n $.each(paras, (idx, para) => {\n $(para).css('marginLeft', (idx, val) => {\n return (parseInt(val, 10) || 0) + 25;\n });\n });\n }\n });\n\n rng.select();\n }\n\n /**\n * outdent\n */\n outdent(editable) {\n const rng = range.create(editable).wrapBodyInlineWithPara();\n\n const paras = rng.nodes(dom.isPara, { includeAncestor: true });\n const clustereds = lists.clusterBy(paras, func.peq2('parentNode'));\n\n $.each(clustereds, (idx, paras) => {\n const head = lists.head(paras);\n if (dom.isLi(head)) {\n this.releaseList([paras]);\n } else {\n $.each(paras, (idx, para) => {\n $(para).css('marginLeft', (idx, val) => {\n val = (parseInt(val, 10) || 0);\n return val > 25 ? val - 25 : '';\n });\n });\n }\n });\n\n rng.select();\n }\n\n /**\n * toggle list\n *\n * @param {String} listName - OL or UL\n */\n toggleList(listName, editable) {\n const rng = range.create(editable).wrapBodyInlineWithPara();\n\n let paras = rng.nodes(dom.isPara, { includeAncestor: true });\n const bookmark = rng.paraBookmark(paras);\n const clustereds = lists.clusterBy(paras, func.peq2('parentNode'));\n\n // paragraph to list\n if (lists.find(paras, dom.isPurePara)) {\n let wrappedParas = [];\n $.each(clustereds, (idx, paras) => {\n wrappedParas = wrappedParas.concat(this.wrapList(paras, listName));\n });\n paras = wrappedParas;\n // list to paragraph or change list style\n } else {\n const diffLists = rng.nodes(dom.isList, {\n includeAncestor: true\n }).filter((listNode) => {\n return !$.nodeName(listNode, listName);\n });\n\n if (diffLists.length) {\n $.each(diffLists, (idx, listNode) => {\n dom.replace(listNode, listName);\n });\n } else {\n paras = this.releaseList(clustereds, true);\n }\n }\n\n range.createFromParaBookmark(bookmark, paras).select();\n }\n\n /**\n * @param {Node[]} paras\n * @param {String} listName\n * @return {Node[]}\n */\n wrapList(paras, listName) {\n const head = lists.head(paras);\n const last = lists.last(paras);\n\n const prevList = dom.isList(head.previousSibling) && head.previousSibling;\n const nextList = dom.isList(last.nextSibling) && last.nextSibling;\n\n const listNode = prevList || dom.insertAfter(dom.create(listName || 'UL'), last);\n\n // P to LI\n paras = paras.map((para) => {\n return dom.isPurePara(para) ? dom.replace(para, 'LI') : para;\n });\n\n // append to list(<ul>, <ol>)\n dom.appendChildNodes(listNode, paras);\n\n if (nextList) {\n dom.appendChildNodes(listNode, lists.from(nextList.childNodes));\n dom.remove(nextList);\n }\n\n return paras;\n }\n\n /**\n * @method releaseList\n *\n * @param {Array[]} clustereds\n * @param {Boolean} isEscapseToBody\n * @return {Node[]}\n */\n releaseList(clustereds, isEscapseToBody) {\n let releasedParas = [];\n\n $.each(clustereds, (idx, paras) => {\n const head = lists.head(paras);\n const last = lists.last(paras);\n\n const headList = isEscapseToBody ? dom.lastAncestor(head, dom.isList) : head.parentNode;\n const lastList = headList.childNodes.length > 1 ? dom.splitTree(headList, {\n node: last.parentNode,\n offset: dom.position(last) + 1\n }, {\n isSkipPaddingBlankHTML: true\n }) : null;\n\n const middleList = dom.splitTree(headList, {\n node: head.parentNode,\n offset: dom.position(head)\n }, {\n isSkipPaddingBlankHTML: true\n });\n\n paras = isEscapseToBody ? dom.listDescendant(middleList, dom.isLi)\n : lists.from(middleList.childNodes).filter(dom.isLi);\n\n // LI to P\n if (isEscapseToBody || !dom.isList(headList.parentNode)) {\n paras = paras.map((para) => {\n return dom.replace(para, 'P');\n });\n }\n\n $.each(lists.from(paras).reverse(), (idx, para) => {\n dom.insertAfter(para, headList);\n });\n\n // remove empty lists\n const rootLists = lists.compact([headList, middleList, lastList]);\n $.each(rootLists, (idx, rootList) => {\n const listNodes = [rootList].concat(dom.listDescendant(rootList, dom.isList));\n $.each(listNodes.reverse(), (idx, listNode) => {\n if (!dom.nodeLength(listNode)) {\n dom.remove(listNode, true);\n }\n });\n });\n\n releasedParas = releasedParas.concat(paras);\n });\n\n return releasedParas;\n }\n}\n","import $ from 'jquery';\nimport dom from '../core/dom';\nimport range from '../core/range';\nimport Bullet from '../editing/Bullet';\n\n/**\n * @class editing.Typing\n *\n * Typing\n *\n */\nexport default class Typing {\n constructor() {\n // a Bullet instance to toggle lists off\n this.bullet = new Bullet();\n }\n\n /**\n * insert tab\n *\n * @param {WrappedRange} rng\n * @param {Number} tabsize\n */\n insertTab(rng, tabsize) {\n const tab = dom.createText(new Array(tabsize + 1).join(dom.NBSP_CHAR));\n rng = rng.deleteContents();\n rng.insertNode(tab, true);\n\n rng = range.create(tab, tabsize);\n rng.select();\n }\n\n /**\n * insert paragraph\n */\n insertParagraph(editable) {\n let rng = range.create(editable);\n\n // deleteContents on range.\n rng = rng.deleteContents();\n\n // Wrap range if it needs to be wrapped by paragraph\n rng = rng.wrapBodyInlineWithPara();\n\n // finding paragraph\n const splitRoot = dom.ancestor(rng.sc, dom.isPara);\n\n let nextPara;\n // on paragraph: split paragraph\n if (splitRoot) {\n // if it is an empty line with li\n if (dom.isEmpty(splitRoot) && dom.isLi(splitRoot)) {\n // toogle UL/OL and escape\n this.bullet.toggleList(splitRoot.parentNode.nodeName);\n return;\n // if it is an empty line with para on blockquote\n } else if (dom.isEmpty(splitRoot) && dom.isPara(splitRoot) && dom.isBlockquote(splitRoot.parentNode)) {\n // escape blockquote\n dom.insertAfter(splitRoot, splitRoot.parentNode);\n nextPara = splitRoot;\n // if new line has content (not a line break)\n } else {\n nextPara = dom.splitTree(splitRoot, rng.getStartPoint());\n\n let emptyAnchors = dom.listDescendant(splitRoot, dom.isEmptyAnchor);\n emptyAnchors = emptyAnchors.concat(dom.listDescendant(nextPara, dom.isEmptyAnchor));\n\n $.each(emptyAnchors, (idx, anchor) => {\n dom.remove(anchor);\n });\n\n // replace empty heading, pre or custom-made styleTag with P tag\n if ((dom.isHeading(nextPara) || dom.isPre(nextPara) || dom.isCustomStyleTag(nextPara)) && dom.isEmpty(nextPara)) {\n nextPara = dom.replace(nextPara, 'p');\n }\n }\n // no paragraph: insert empty paragraph\n } else {\n const next = rng.sc.childNodes[rng.so];\n nextPara = $(dom.emptyPara)[0];\n if (next) {\n rng.sc.insertBefore(nextPara, next);\n } else {\n rng.sc.appendChild(nextPara);\n }\n }\n\n range.create(nextPara, 0).normalize().select().scrollIntoView(editable);\n }\n}\n","import $ from 'jquery';\nimport dom from '../core/dom';\nimport range from '../core/range';\nimport lists from '../core/lists';\n\n/**\n * @class Create a virtual table to create what actions to do in change.\n * @param {object} startPoint Cell selected to apply change.\n * @param {enum} where Where change will be applied Row or Col. Use enum: TableResultAction.where\n * @param {enum} action Action to be applied. Use enum: TableResultAction.requestAction\n * @param {object} domTable Dom element of table to make changes.\n */\nconst TableResultAction = function(startPoint, where, action, domTable) {\n const _startPoint = { 'colPos': 0, 'rowPos': 0 };\n const _virtualTable = [];\n const _actionCellList = [];\n\n /// ///////////////////////////////////////////\n // Private functions\n /// ///////////////////////////////////////////\n\n /**\n * Set the startPoint of action.\n */\n function setStartPoint() {\n if (!startPoint || !startPoint.tagName || (startPoint.tagName.toLowerCase() !== 'td' && startPoint.tagName.toLowerCase() !== 'th')) {\n console.error('Impossible to identify start Cell point.', startPoint);\n return;\n }\n _startPoint.colPos = startPoint.cellIndex;\n if (!startPoint.parentElement || !startPoint.parentElement.tagName || startPoint.parentElement.tagName.toLowerCase() !== 'tr') {\n console.error('Impossible to identify start Row point.', startPoint);\n return;\n }\n _startPoint.rowPos = startPoint.parentElement.rowIndex;\n }\n\n /**\n * Define virtual table position info object.\n *\n * @param {int} rowIndex Index position in line of virtual table.\n * @param {int} cellIndex Index position in column of virtual table.\n * @param {object} baseRow Row affected by this position.\n * @param {object} baseCell Cell affected by this position.\n * @param {bool} isSpan Inform if it is an span cell/row.\n */\n function setVirtualTablePosition(rowIndex, cellIndex, baseRow, baseCell, isRowSpan, isColSpan, isVirtualCell) {\n const objPosition = {\n 'baseRow': baseRow,\n 'baseCell': baseCell,\n 'isRowSpan': isRowSpan,\n 'isColSpan': isColSpan,\n 'isVirtual': isVirtualCell\n };\n if (!_virtualTable[rowIndex]) {\n _virtualTable[rowIndex] = [];\n }\n _virtualTable[rowIndex][cellIndex] = objPosition;\n }\n\n /**\n * Create action cell object.\n *\n * @param {object} virtualTableCellObj Object of specific position on virtual table.\n * @param {enum} resultAction Action to be applied in that item.\n */\n function getActionCell(virtualTableCellObj, resultAction, virtualRowPosition, virtualColPosition) {\n return {\n 'baseCell': virtualTableCellObj.baseCell,\n 'action': resultAction,\n 'virtualTable': {\n 'rowIndex': virtualRowPosition,\n 'cellIndex': virtualColPosition\n }\n };\n }\n\n /**\n * Recover free index of row to append Cell.\n *\n * @param {int} rowIndex Index of row to find free space.\n * @param {int} cellIndex Index of cell to find free space in table.\n */\n function recoverCellIndex(rowIndex, cellIndex) {\n if (!_virtualTable[rowIndex]) {\n return cellIndex;\n }\n if (!_virtualTable[rowIndex][cellIndex]) {\n return cellIndex;\n }\n\n let newCellIndex = cellIndex;\n while (_virtualTable[rowIndex][newCellIndex]) {\n newCellIndex++;\n if (!_virtualTable[rowIndex][newCellIndex]) {\n return newCellIndex;\n }\n }\n }\n\n /**\n * Recover info about row and cell and add information to virtual table.\n *\n * @param {object} row Row to recover information.\n * @param {object} cell Cell to recover information.\n */\n function addCellInfoToVirtual(row, cell) {\n const cellIndex = recoverCellIndex(row.rowIndex, cell.cellIndex);\n const cellHasColspan = (cell.colSpan > 1);\n const cellHasRowspan = (cell.rowSpan > 1);\n const isThisSelectedCell = (row.rowIndex === _startPoint.rowPos && cell.cellIndex === _startPoint.colPos);\n setVirtualTablePosition(row.rowIndex, cellIndex, row, cell, cellHasRowspan, cellHasColspan, false);\n\n // Add span rows to virtual Table.\n const rowspanNumber = cell.attributes.rowSpan ? parseInt(cell.attributes.rowSpan.value, 10) : 0;\n if (rowspanNumber > 1) {\n for (let rp = 1; rp < rowspanNumber; rp++) {\n const rowspanIndex = row.rowIndex + rp;\n adjustStartPoint(rowspanIndex, cellIndex, cell, isThisSelectedCell);\n setVirtualTablePosition(rowspanIndex, cellIndex, row, cell, true, cellHasColspan, true);\n }\n }\n\n // Add span cols to virtual table.\n const colspanNumber = cell.attributes.colSpan ? parseInt(cell.attributes.colSpan.value, 10) : 0;\n if (colspanNumber > 1) {\n for (let cp = 1; cp < colspanNumber; cp++) {\n const cellspanIndex = recoverCellIndex(row.rowIndex, (cellIndex + cp));\n adjustStartPoint(row.rowIndex, cellspanIndex, cell, isThisSelectedCell);\n setVirtualTablePosition(row.rowIndex, cellspanIndex, row, cell, cellHasRowspan, true, true);\n }\n }\n }\n\n /**\n * Process validation and adjust of start point if needed\n *\n * @param {int} rowIndex\n * @param {int} cellIndex\n * @param {object} cell\n * @param {bool} isSelectedCell\n */\n function adjustStartPoint(rowIndex, cellIndex, cell, isSelectedCell) {\n if (rowIndex === _startPoint.rowPos && _startPoint.colPos >= cell.cellIndex && cell.cellIndex <= cellIndex && !isSelectedCell) {\n _startPoint.colPos++;\n }\n }\n\n /**\n * Create virtual table of cells with all cells, including span cells.\n */\n function createVirtualTable() {\n const rows = domTable.rows;\n for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) {\n const cells = rows[rowIndex].cells;\n for (let cellIndex = 0; cellIndex < cells.length; cellIndex++) {\n addCellInfoToVirtual(rows[rowIndex], cells[cellIndex]);\n }\n }\n }\n\n /**\n * Get action to be applied on the cell.\n *\n * @param {object} cell virtual table cell to apply action\n */\n function getDeleteResultActionToCell(cell) {\n switch (where) {\n case TableResultAction.where.Column:\n if (cell.isColSpan) {\n return TableResultAction.resultAction.SubtractSpanCount;\n }\n break;\n case TableResultAction.where.Row:\n if (!cell.isVirtual && cell.isRowSpan) {\n return TableResultAction.resultAction.AddCell;\n } else if (cell.isRowSpan) {\n return TableResultAction.resultAction.SubtractSpanCount;\n }\n break;\n }\n return TableResultAction.resultAction.RemoveCell;\n }\n\n /**\n * Get action to be applied on the cell.\n *\n * @param {object} cell virtual table cell to apply action\n */\n function getAddResultActionToCell(cell) {\n switch (where) {\n case TableResultAction.where.Column:\n if (cell.isColSpan) {\n return TableResultAction.resultAction.SumSpanCount;\n } else if (cell.isRowSpan && cell.isVirtual) {\n return TableResultAction.resultAction.Ignore;\n }\n break;\n case TableResultAction.where.Row:\n if (cell.isRowSpan) {\n return TableResultAction.resultAction.SumSpanCount;\n } else if (cell.isColSpan && cell.isVirtual) {\n return TableResultAction.resultAction.Ignore;\n }\n break;\n }\n return TableResultAction.resultAction.AddCell;\n }\n\n function init() {\n setStartPoint();\n createVirtualTable();\n }\n\n /// ///////////////////////////////////////////\n // Public functions\n /// ///////////////////////////////////////////\n\n /**\n * Recover array os what to do in table.\n */\n this.getActionList = function() {\n const fixedRow = (where === TableResultAction.where.Row) ? _startPoint.rowPos : -1;\n const fixedCol = (where === TableResultAction.where.Column) ? _startPoint.colPos : -1;\n\n let actualPosition = 0;\n let canContinue = true;\n while (canContinue) {\n const rowPosition = (fixedRow >= 0) ? fixedRow : actualPosition;\n const colPosition = (fixedCol >= 0) ? fixedCol : actualPosition;\n const row = _virtualTable[rowPosition];\n if (!row) {\n canContinue = false;\n return _actionCellList;\n }\n const cell = row[colPosition];\n if (!cell) {\n canContinue = false;\n return _actionCellList;\n }\n\n // Define action to be applied in this cell\n let resultAction = TableResultAction.resultAction.Ignore;\n switch (action) {\n case TableResultAction.requestAction.Add:\n resultAction = getAddResultActionToCell(cell);\n break;\n case TableResultAction.requestAction.Delete:\n resultAction = getDeleteResultActionToCell(cell);\n break;\n }\n _actionCellList.push(getActionCell(cell, resultAction, rowPosition, colPosition));\n actualPosition++;\n }\n\n return _actionCellList;\n };\n\n init();\n};\n/**\n*\n* Where action occours enum.\n*/\nTableResultAction.where = { 'Row': 0, 'Column': 1 };\n/**\n*\n* Requested action to apply enum.\n*/\nTableResultAction.requestAction = { 'Add': 0, 'Delete': 1 };\n/**\n*\n* Result action to be executed enum.\n*/\nTableResultAction.resultAction = { 'Ignore': 0, 'SubtractSpanCount': 1, 'RemoveCell': 2, 'AddCell': 3, 'SumSpanCount': 4 };\n\n/**\n *\n * @class editing.Table\n *\n * Table\n *\n */\nexport default class Table {\n /**\n * handle tab key\n *\n * @param {WrappedRange} rng\n * @param {Boolean} isShift\n */\n tab(rng, isShift) {\n const cell = dom.ancestor(rng.commonAncestor(), dom.isCell);\n const table = dom.ancestor(cell, dom.isTable);\n const cells = dom.listDescendant(table, dom.isCell);\n\n const nextCell = lists[isShift ? 'prev' : 'next'](cells, cell);\n if (nextCell) {\n range.create(nextCell, 0).select();\n }\n }\n\n /**\n * Add a new row\n *\n * @param {WrappedRange} rng\n * @param {String} position (top/bottom)\n * @return {Node}\n */\n addRow(rng, position) {\n const cell = dom.ancestor(rng.commonAncestor(), dom.isCell);\n\n const currentTr = $(cell).closest('tr');\n const trAttributes = this.recoverAttributes(currentTr);\n const html = $('<tr' + trAttributes + '></tr>');\n\n const vTable = new TableResultAction(cell, TableResultAction.where.Row,\n TableResultAction.requestAction.Add, $(currentTr).closest('table')[0]);\n const actions = vTable.getActionList();\n\n for (let idCell = 0; idCell < actions.length; idCell++) {\n const currentCell = actions[idCell];\n const tdAttributes = this.recoverAttributes(currentCell.baseCell);\n switch (currentCell.action) {\n case TableResultAction.resultAction.AddCell:\n html.append('<td' + tdAttributes + '>' + dom.blank + '</td>');\n break;\n case TableResultAction.resultAction.SumSpanCount:\n if (position === 'top') {\n const baseCellTr = currentCell.baseCell.parent;\n const isTopFromRowSpan = (!baseCellTr ? 0 : currentCell.baseCell.closest('tr').rowIndex) <= currentTr[0].rowIndex;\n if (isTopFromRowSpan) {\n const newTd = $('<div></div>').append($('<td' + tdAttributes + '>' + dom.blank + '</td>').removeAttr('rowspan')).html();\n html.append(newTd);\n break;\n }\n }\n let rowspanNumber = parseInt(currentCell.baseCell.rowSpan, 10);\n rowspanNumber++;\n currentCell.baseCell.setAttribute('rowSpan', rowspanNumber);\n break;\n }\n }\n\n if (position === 'top') {\n currentTr.before(html);\n } else {\n const cellHasRowspan = (cell.rowSpan > 1);\n if (cellHasRowspan) {\n const lastTrIndex = currentTr[0].rowIndex + (cell.rowSpan - 2);\n $($(currentTr).parent().find('tr')[lastTrIndex]).after($(html));\n return;\n }\n currentTr.after(html);\n }\n }\n\n /**\n * Add a new col\n *\n * @param {WrappedRange} rng\n * @param {String} position (left/right)\n * @return {Node}\n */\n addCol(rng, position) {\n const cell = dom.ancestor(rng.commonAncestor(), dom.isCell);\n const row = $(cell).closest('tr');\n const rowsGroup = $(row).siblings();\n rowsGroup.push(row);\n\n const vTable = new TableResultAction(cell, TableResultAction.where.Column,\n TableResultAction.requestAction.Add, $(row).closest('table')[0]);\n const actions = vTable.getActionList();\n\n for (let actionIndex = 0; actionIndex < actions.length; actionIndex++) {\n const currentCell = actions[actionIndex];\n const tdAttributes = this.recoverAttributes(currentCell.baseCell);\n switch (currentCell.action) {\n case TableResultAction.resultAction.AddCell:\n if (position === 'right') {\n $(currentCell.baseCell).after('<td' + tdAttributes + '>' + dom.blank + '</td>');\n } else {\n $(currentCell.baseCell).before('<td' + tdAttributes + '>' + dom.blank + '</td>');\n }\n break;\n case TableResultAction.resultAction.SumSpanCount:\n if (position === 'right') {\n let colspanNumber = parseInt(currentCell.baseCell.colSpan, 10);\n colspanNumber++;\n currentCell.baseCell.setAttribute('colSpan', colspanNumber);\n } else {\n $(currentCell.baseCell).before('<td' + tdAttributes + '>' + dom.blank + '</td>');\n }\n break;\n }\n }\n }\n\n /*\n * Copy attributes from element.\n *\n * @param {object} Element to recover attributes.\n * @return {string} Copied string elements.\n */\n recoverAttributes(el) {\n let resultStr = '';\n\n if (!el) {\n return resultStr;\n }\n\n const attrList = el.attributes || [];\n\n for (let i = 0; i < attrList.length; i++) {\n if (attrList[i].name.toLowerCase() === 'id') {\n continue;\n }\n\n if (attrList[i].specified) {\n resultStr += ' ' + attrList[i].name + '=\\'' + attrList[i].value + '\\'';\n }\n }\n\n return resultStr;\n }\n\n /**\n * Delete current row\n *\n * @param {WrappedRange} rng\n * @return {Node}\n */\n deleteRow(rng) {\n const cell = dom.ancestor(rng.commonAncestor(), dom.isCell);\n const row = $(cell).closest('tr');\n const cellPos = row.children('td, th').index($(cell));\n const rowPos = row[0].rowIndex;\n\n const vTable = new TableResultAction(cell, TableResultAction.where.Row,\n TableResultAction.requestAction.Delete, $(row).closest('table')[0]);\n const actions = vTable.getActionList();\n\n for (let actionIndex = 0; actionIndex < actions.length; actionIndex++) {\n if (!actions[actionIndex]) {\n continue;\n }\n\n const baseCell = actions[actionIndex].baseCell;\n const virtualPosition = actions[actionIndex].virtualTable;\n const hasRowspan = (baseCell.rowSpan && baseCell.rowSpan > 1);\n let rowspanNumber = (hasRowspan) ? parseInt(baseCell.rowSpan, 10) : 0;\n switch (actions[actionIndex].action) {\n case TableResultAction.resultAction.Ignore:\n continue;\n case TableResultAction.resultAction.AddCell:\n const nextRow = row.next('tr')[0];\n if (!nextRow) { continue; }\n const cloneRow = row[0].cells[cellPos];\n if (hasRowspan) {\n if (rowspanNumber > 2) {\n rowspanNumber--;\n nextRow.insertBefore(cloneRow, nextRow.cells[cellPos]);\n nextRow.cells[cellPos].setAttribute('rowSpan', rowspanNumber);\n nextRow.cells[cellPos].innerHTML = '';\n } else if (rowspanNumber === 2) {\n nextRow.insertBefore(cloneRow, nextRow.cells[cellPos]);\n nextRow.cells[cellPos].removeAttribute('rowSpan');\n nextRow.cells[cellPos].innerHTML = '';\n }\n }\n continue;\n case TableResultAction.resultAction.SubtractSpanCount:\n if (hasRowspan) {\n if (rowspanNumber > 2) {\n rowspanNumber--;\n baseCell.setAttribute('rowSpan', rowspanNumber);\n if (virtualPosition.rowIndex !== rowPos && baseCell.cellIndex === cellPos) { baseCell.innerHTML = ''; }\n } else if (rowspanNumber === 2) {\n baseCell.removeAttribute('rowSpan');\n if (virtualPosition.rowIndex !== rowPos && baseCell.cellIndex === cellPos) { baseCell.innerHTML = ''; }\n }\n }\n continue;\n case TableResultAction.resultAction.RemoveCell:\n // Do not need remove cell because row will be deleted.\n continue;\n }\n }\n row.remove();\n }\n\n /**\n * Delete current col\n *\n * @param {WrappedRange} rng\n * @return {Node}\n */\n deleteCol(rng) {\n const cell = dom.ancestor(rng.commonAncestor(), dom.isCell);\n const row = $(cell).closest('tr');\n const cellPos = row.children('td, th').index($(cell));\n\n const vTable = new TableResultAction(cell, TableResultAction.where.Column,\n TableResultAction.requestAction.Delete, $(row).closest('table')[0]);\n const actions = vTable.getActionList();\n\n for (let actionIndex = 0; actionIndex < actions.length; actionIndex++) {\n if (!actions[actionIndex]) {\n continue;\n }\n switch (actions[actionIndex].action) {\n case TableResultAction.resultAction.Ignore:\n continue;\n case TableResultAction.resultAction.SubtractSpanCount:\n const baseCell = actions[actionIndex].baseCell;\n const hasColspan = (baseCell.colSpan && baseCell.colSpan > 1);\n if (hasColspan) {\n let colspanNumber = (baseCell.colSpan) ? parseInt(baseCell.colSpan, 10) : 0;\n if (colspanNumber > 2) {\n colspanNumber--;\n baseCell.setAttribute('colSpan', colspanNumber);\n if (baseCell.cellIndex === cellPos) { baseCell.innerHTML = ''; }\n } else if (colspanNumber === 2) {\n baseCell.removeAttribute('colSpan');\n if (baseCell.cellIndex === cellPos) { baseCell.innerHTML = ''; }\n }\n }\n continue;\n case TableResultAction.resultAction.RemoveCell:\n dom.remove(actions[actionIndex].baseCell, true);\n continue;\n }\n }\n }\n\n /**\n * create empty table element\n *\n * @param {Number} rowCount\n * @param {Number} colCount\n * @return {Node}\n */\n createTable(colCount, rowCount, options) {\n const tds = [];\n let tdHTML;\n for (let idxCol = 0; idxCol < colCount; idxCol++) {\n tds.push('<td>' + dom.blank + '</td>');\n }\n tdHTML = tds.join('');\n\n const trs = [];\n let trHTML;\n for (let idxRow = 0; idxRow < rowCount; idxRow++) {\n trs.push('<tr>' + tdHTML + '</tr>');\n }\n trHTML = trs.join('');\n const $table = $('<table>' + trHTML + '</table>');\n if (options && options.tableClassName) {\n $table.addClass(options.tableClassName);\n }\n\n return $table[0];\n }\n\n /**\n * Delete current table\n *\n * @param {WrappedRange} rng\n * @return {Node}\n */\n deleteTable(rng) {\n const cell = dom.ancestor(rng.commonAncestor(), dom.isCell);\n $(cell).closest('table').remove();\n }\n}\n","import $ from 'jquery';\nimport env from '../core/env';\nimport key from '../core/key';\nimport func from '../core/func';\nimport lists from '../core/lists';\nimport dom from '../core/dom';\nimport range from '../core/range';\nimport { readFileAsDataURL, createImage } from '../core/async';\nimport History from '../editing/History';\nimport Style from '../editing/Style';\nimport Typing from '../editing/Typing';\nimport Table from '../editing/Table';\nimport Bullet from '../editing/Bullet';\n\nconst KEY_BOGUS = 'bogus';\n\n/**\n * @class Editor\n */\nexport default class Editor {\n constructor(context) {\n this.context = context;\n\n this.$note = context.layoutInfo.note;\n this.$editor = context.layoutInfo.editor;\n this.$editable = context.layoutInfo.editable;\n this.options = context.options;\n this.lang = this.options.langInfo;\n\n this.editable = this.$editable[0];\n this.lastRange = null;\n\n this.style = new Style();\n this.table = new Table();\n this.typing = new Typing();\n this.bullet = new Bullet();\n this.history = new History(this.$editable);\n\n this.context.memo('help.undo', this.lang.help.undo);\n this.context.memo('help.redo', this.lang.help.redo);\n this.context.memo('help.tab', this.lang.help.tab);\n this.context.memo('help.untab', this.lang.help.untab);\n this.context.memo('help.insertParagraph', this.lang.help.insertParagraph);\n this.context.memo('help.insertOrderedList', this.lang.help.insertOrderedList);\n this.context.memo('help.insertUnorderedList', this.lang.help.insertUnorderedList);\n this.context.memo('help.indent', this.lang.help.indent);\n this.context.memo('help.outdent', this.lang.help.outdent);\n this.context.memo('help.formatPara', this.lang.help.formatPara);\n this.context.memo('help.insertHorizontalRule', this.lang.help.insertHorizontalRule);\n this.context.memo('help.fontName', this.lang.help.fontName);\n\n // native commands(with execCommand), generate function for execCommand\n const commands = [\n 'bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript',\n 'justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull',\n 'formatBlock', 'removeFormat', 'backColor'\n ];\n\n for (let idx = 0, len = commands.length; idx < len; idx++) {\n this[commands[idx]] = ((sCmd) => {\n return (value) => {\n this.beforeCommand();\n document.execCommand(sCmd, false, value);\n this.afterCommand(true);\n };\n })(commands[idx]);\n this.context.memo('help.' + commands[idx], this.lang.help[commands[idx]]);\n }\n\n this.fontName = this.wrapCommand((value) => {\n return this.fontStyling('font-family', \"\\'\" + value + \"\\'\");\n });\n\n this.fontSize = this.wrapCommand((value) => {\n return this.fontStyling('font-size', value + 'px');\n });\n\n for (let idx = 1; idx <= 6; idx++) {\n this['formatH' + idx] = ((idx) => {\n return () => {\n this.formatBlock('H' + idx);\n };\n })(idx);\n this.context.memo('help.formatH' + idx, this.lang.help['formatH' + idx]);\n };\n\n this.insertParagraph = this.wrapCommand(() => {\n this.typing.insertParagraph(this.editable);\n });\n\n this.insertOrderedList = this.wrapCommand(() => {\n this.bullet.insertOrderedList(this.editable);\n });\n\n this.insertUnorderedList = this.wrapCommand(() => {\n this.bullet.insertUnorderedList(this.editable);\n });\n\n this.indent = this.wrapCommand(() => {\n this.bullet.indent(this.editable);\n });\n\n this.outdent = this.wrapCommand(() => {\n this.bullet.outdent(this.editable);\n });\n\n /**\n * insertNode\n * insert node\n * @param {Node} node\n */\n this.insertNode = this.wrapCommand((node) => {\n if (this.isLimited($(node).text().length)) {\n return;\n }\n const rng = this.createRange();\n rng.insertNode(node);\n range.createFromNodeAfter(node).select();\n });\n\n /**\n * insert text\n * @param {String} text\n */\n this.insertText = this.wrapCommand((text) => {\n if (this.isLimited(text.length)) {\n return;\n }\n const rng = this.createRange();\n const textNode = rng.insertNode(dom.createText(text));\n range.create(textNode, dom.nodeLength(textNode)).select();\n });\n /**\n * paste HTML\n * @param {String} markup\n */\n this.pasteHTML = this.wrapCommand((markup) => {\n if (this.isLimited(markup.length)) {\n return;\n }\n const contents = this.createRange().pasteHTML(markup);\n range.createFromNodeAfter(lists.last(contents)).select();\n });\n\n /**\n * formatBlock\n *\n * @param {String} tagName\n */\n this.formatBlock = this.wrapCommand((tagName, $target) => {\n const onApplyCustomStyle = this.options.callbacks.onApplyCustomStyle;\n if (onApplyCustomStyle) {\n onApplyCustomStyle.call(this, $target, this.context, this.onFormatBlock);\n } else {\n this.onFormatBlock(tagName, $target);\n }\n });\n\n /**\n * insert horizontal rule\n */\n this.insertHorizontalRule = this.wrapCommand(() => {\n const hrNode = this.createRange().insertNode(dom.create('HR'));\n if (hrNode.nextSibling) {\n range.create(hrNode.nextSibling, 0).normalize().select();\n }\n });\n\n /**\n * lineHeight\n * @param {String} value\n */\n this.lineHeight = this.wrapCommand((value) => {\n this.style.stylePara(this.createRange(), {\n lineHeight: value\n });\n });\n\n /**\n * create link (command)\n *\n * @param {Object} linkInfo\n */\n this.createLink = this.wrapCommand((linkInfo) => {\n let linkUrl = linkInfo.url;\n const linkText = linkInfo.text;\n const isNewWindow = linkInfo.isNewWindow;\n let rng = linkInfo.range || this.createRange();\n const isTextChanged = rng.toString() !== linkText;\n\n // handle spaced urls from input\n if (typeof linkUrl === 'string') {\n linkUrl = linkUrl.trim();\n }\n\n if (this.options.onCreateLink) {\n linkUrl = this.options.onCreateLink(linkUrl);\n } else {\n // if url doesn't match an URL schema, set http:// as default\n linkUrl = /^[A-Za-z][A-Za-z0-9+-.]*\\:[\\/\\/]?/.test(linkUrl)\n ? linkUrl : 'http://' + linkUrl;\n }\n\n let anchors = [];\n if (isTextChanged) {\n rng = rng.deleteContents();\n const anchor = rng.insertNode($('<A>' + linkText + '</A>')[0]);\n anchors.push(anchor);\n } else {\n anchors = this.style.styleNodes(rng, {\n nodeName: 'A',\n expandClosestSibling: true,\n onlyPartialContains: true\n });\n }\n\n $.each(anchors, (idx, anchor) => {\n $(anchor).attr('href', linkUrl);\n if (isNewWindow) {\n $(anchor).attr('target', '_blank');\n } else {\n $(anchor).removeAttr('target');\n }\n });\n\n const startRange = range.createFromNodeBefore(lists.head(anchors));\n const startPoint = startRange.getStartPoint();\n const endRange = range.createFromNodeAfter(lists.last(anchors));\n const endPoint = endRange.getEndPoint();\n\n range.create(\n startPoint.node,\n startPoint.offset,\n endPoint.node,\n endPoint.offset\n ).select();\n });\n\n /**\n * setting color\n *\n * @param {Object} sObjColor color code\n * @param {String} sObjColor.foreColor foreground color\n * @param {String} sObjColor.backColor background color\n */\n this.color = this.wrapCommand((colorInfo) => {\n const foreColor = colorInfo.foreColor;\n const backColor = colorInfo.backColor;\n\n if (foreColor) { document.execCommand('foreColor', false, foreColor); }\n if (backColor) { document.execCommand('backColor', false, backColor); }\n });\n\n /**\n * Set foreground color\n *\n * @param {String} colorCode foreground color code\n */\n this.foreColor = this.wrapCommand((colorInfo) => {\n document.execCommand('styleWithCSS', false, true);\n document.execCommand('foreColor', false, colorInfo);\n });\n\n /**\n * insert Table\n *\n * @param {String} dimension of table (ex : \"5x5\")\n */\n this.insertTable = this.wrapCommand((dim) => {\n const dimension = dim.split('x');\n\n const rng = this.createRange().deleteContents();\n rng.insertNode(this.table.createTable(dimension[0], dimension[1], this.options));\n });\n\n /**\n * remove media object and Figure Elements if media object is img with Figure.\n */\n this.removeMedia = this.wrapCommand(() => {\n let $target = $(this.restoreTarget()).parent();\n if ($target.parent('figure').length) {\n $target.parent('figure').remove();\n } else {\n $target = $(this.restoreTarget()).detach();\n }\n this.context.triggerEvent('media.delete', $target, this.$editable);\n });\n\n /**\n * float me\n *\n * @param {String} value\n */\n this.floatMe = this.wrapCommand((value) => {\n const $target = $(this.restoreTarget());\n $target.toggleClass('note-float-left', value === 'left');\n $target.toggleClass('note-float-right', value === 'right');\n $target.css('float', value);\n });\n\n /**\n * resize overlay element\n * @param {String} value\n */\n this.resize = this.wrapCommand((value) => {\n const $target = $(this.restoreTarget());\n $target.css({\n width: value * 100 + '%',\n height: ''\n });\n });\n }\n\n initialize() {\n // bind custom events\n this.$editable.on('keydown', (event) => {\n if (event.keyCode === key.code.ENTER) {\n this.context.triggerEvent('enter', event);\n }\n this.context.triggerEvent('keydown', event);\n\n if (!event.isDefaultPrevented()) {\n if (this.options.shortcuts) {\n this.handleKeyMap(event);\n } else {\n this.preventDefaultEditableShortCuts(event);\n }\n }\n if (this.isLimited(1, event)) {\n return false;\n }\n }).on('keyup', (event) => {\n this.context.triggerEvent('keyup', event);\n }).on('focus', (event) => {\n this.context.triggerEvent('focus', event);\n }).on('blur', (event) => {\n this.context.triggerEvent('blur', event);\n }).on('mousedown', (event) => {\n this.context.triggerEvent('mousedown', event);\n }).on('mouseup', (event) => {\n this.context.triggerEvent('mouseup', event);\n }).on('scroll', (event) => {\n this.context.triggerEvent('scroll', event);\n }).on('paste', (event) => {\n this.context.triggerEvent('paste', event);\n });\n\n // init content before set event\n this.$editable.html(dom.html(this.$note) || dom.emptyPara);\n\n this.$editable.on(env.inputEventName, func.debounce(() => {\n this.context.triggerEvent('change', this.$editable.html());\n }, 100));\n\n this.$editor.on('focusin', (event) => {\n this.context.triggerEvent('focusin', event);\n }).on('focusout', (event) => {\n this.context.triggerEvent('focusout', event);\n });\n\n if (!this.options.airMode) {\n if (this.options.width) {\n this.$editor.outerWidth(this.options.width);\n }\n if (this.options.height) {\n this.$editable.outerHeight(this.options.height);\n }\n if (this.options.maxHeight) {\n this.$editable.css('max-height', this.options.maxHeight);\n }\n if (this.options.minHeight) {\n this.$editable.css('min-height', this.options.minHeight);\n }\n }\n\n this.history.recordUndo();\n }\n\n destroy() {\n this.$editable.off();\n }\n\n handleKeyMap(event) {\n const keyMap = this.options.keyMap[env.isMac ? 'mac' : 'pc'];\n const keys = [];\n\n if (event.metaKey) { keys.push('CMD'); }\n if (event.ctrlKey && !event.altKey) { keys.push('CTRL'); }\n if (event.shiftKey) { keys.push('SHIFT'); }\n\n const keyName = key.nameFromCode[event.keyCode];\n if (keyName) {\n keys.push(keyName);\n }\n\n const eventName = keyMap[keys.join('+')];\n if (eventName) {\n if (this.context.invoke(eventName) !== false) {\n event.preventDefault();\n }\n } else if (key.isEdit(event.keyCode)) {\n this.afterCommand();\n }\n }\n\n preventDefaultEditableShortCuts(event) {\n // B(Bold, 66) / I(Italic, 73) / U(Underline, 85)\n if ((event.ctrlKey || event.metaKey) &&\n lists.contains([66, 73, 85], event.keyCode)) {\n event.preventDefault();\n }\n }\n\n isLimited(pad, event) {\n pad = pad || 0;\n\n if (typeof event !== 'undefined') {\n if (key.isMove(event.keyCode) ||\n (event.ctrlKey || event.metaKey) ||\n lists.contains([key.code.BACKSPACE, key.code.DELETE], event.keyCode)) {\n return false;\n }\n }\n\n if (this.options.maxTextLength > 0) {\n if ((this.$editable.text().length + pad) >= this.options.maxTextLength) {\n return true;\n }\n }\n return false;\n }\n /**\n * create range\n * @return {WrappedRange}\n */\n createRange() {\n this.focus();\n return range.create(this.editable);\n }\n\n /**\n * saveRange\n *\n * save current range\n *\n * @param {Boolean} [thenCollapse=false]\n */\n saveRange(thenCollapse) {\n this.lastRange = this.createRange();\n if (thenCollapse) {\n this.lastRange.collapse().select();\n }\n }\n\n /**\n * restoreRange\n *\n * restore lately range\n */\n restoreRange() {\n if (this.lastRange) {\n this.lastRange.select();\n this.focus();\n }\n }\n\n saveTarget(node) {\n this.$editable.data('target', node);\n }\n\n clearTarget() {\n this.$editable.removeData('target');\n }\n\n restoreTarget() {\n return this.$editable.data('target');\n }\n\n /**\n * currentStyle\n *\n * current style\n * @return {Object|Boolean} unfocus\n */\n currentStyle() {\n let rng = range.create();\n if (rng) {\n rng = rng.normalize();\n }\n return rng ? this.style.current(rng) : this.style.fromNode(this.$editable);\n }\n\n /**\n * style from node\n *\n * @param {jQuery} $node\n * @return {Object}\n */\n styleFromNode($node) {\n return this.style.fromNode($node);\n }\n\n /**\n * undo\n */\n undo() {\n this.context.triggerEvent('before.command', this.$editable.html());\n this.history.undo();\n this.context.triggerEvent('change', this.$editable.html());\n }\n\n /**\n * redo\n */\n redo() {\n this.context.triggerEvent('before.command', this.$editable.html());\n this.history.redo();\n this.context.triggerEvent('change', this.$editable.html());\n }\n\n /**\n * before command\n */\n beforeCommand() {\n this.context.triggerEvent('before.command', this.$editable.html());\n // keep focus on editable before command execution\n this.focus();\n }\n\n /**\n * after command\n * @param {Boolean} isPreventTrigger\n */\n afterCommand(isPreventTrigger) {\n this.history.recordUndo();\n if (!isPreventTrigger) {\n this.context.triggerEvent('change', this.$editable.html());\n }\n }\n\n /**\n * handle tab key\n */\n tab() {\n const rng = this.createRange();\n if (rng.isCollapsed() && rng.isOnCell()) {\n this.table.tab(rng);\n } else {\n if (this.options.tabSize === 0) {\n return false;\n }\n\n if (!this.isLimited(this.options.tabSize)) {\n this.beforeCommand();\n this.typing.insertTab(rng, this.options.tabSize);\n this.afterCommand();\n }\n }\n }\n\n /**\n * handle shift+tab key\n */\n untab() {\n const rng = this.createRange();\n if (rng.isCollapsed() && rng.isOnCell()) {\n this.table.tab(rng, true);\n } else {\n if (this.options.tabSize === 0) {\n return false;\n }\n }\n }\n\n /**\n * run given function between beforeCommand and afterCommand\n */\n wrapCommand(fn) {\n return () => {\n this.beforeCommand();\n fn.apply(this, arguments);\n this.afterCommand();\n };\n }\n\n /**\n * insert image\n *\n * @param {String} src\n * @param {String|Function} param\n * @return {Promise}\n */\n insertImage(src, param) {\n return createImage(src, param).then(($image) => {\n this.beforeCommand();\n\n if (typeof param === 'function') {\n param($image);\n } else {\n if (typeof param === 'string') {\n $image.attr('data-filename', param);\n }\n $image.css('width', Math.min(this.$editable.width(), $image.width()));\n }\n\n $image.show();\n range.create(this.editable).insertNode($image[0]);\n range.createFromNodeAfter($image[0]).select();\n this.afterCommand();\n }).fail((e) => {\n this.context.triggerEvent('image.upload.error', e);\n });\n }\n\n /**\n * insertImages\n * @param {File[]} files\n */\n insertImages(files) {\n $.each(files, (idx, file) => {\n const filename = file.name;\n if (this.options.maximumImageFileSize && this.options.maximumImageFileSize < file.size) {\n this.context.triggerEvent('image.upload.error', this.lang.image.maximumFileSizeError);\n } else {\n readFileAsDataURL(file).then((dataURL) => {\n return this.insertImage(dataURL, filename);\n }).fail(() => {\n this.context.triggerEvent('image.upload.error');\n });\n }\n });\n }\n\n /**\n * insertImagesOrCallback\n * @param {File[]} files\n */\n insertImagesOrCallback(files) {\n const callbacks = this.options.callbacks;\n\n // If onImageUpload this.options setted\n if (callbacks.onImageUpload) {\n this.context.triggerEvent('image.upload', files);\n // else insert Image as dataURL\n } else {\n this.insertImages(files);\n }\n }\n\n /**\n * return selected plain text\n * @return {String} text\n */\n getSelectedText() {\n let rng = this.createRange();\n\n // if range on anchor, expand range with anchor\n if (rng.isOnAnchor()) {\n rng = range.createFromNode(dom.ancestor(rng.sc, dom.isAnchor));\n }\n\n return rng.toString();\n }\n\n onFormatBlock(tagName, $target) {\n // [workaround] for MSIE, IE need `<`\n tagName = env.isMSIE ? '<' + tagName + '>' : tagName;\n document.execCommand('FormatBlock', false, tagName);\n\n // support custom class\n if ($target && $target.length) {\n const className = $target[0].className || '';\n if (className) {\n const currentRange = this.createRange();\n\n const $parent = $([currentRange.sc, currentRange.ec]).closest(tagName);\n $parent.addClass(className);\n }\n }\n }\n\n formatPara() {\n this.formatBlock('P');\n }\n\n fontStyling(target, value) {\n const rng = this.createRange();\n\n if (rng) {\n const spans = this.style.styleNodes(rng);\n $(spans).css(target, value);\n\n // [workaround] added styled bogus span for style\n // - also bogus character needed for cursor position\n if (rng.isCollapsed()) {\n const firstSpan = lists.head(spans);\n if (firstSpan && !dom.nodeLength(firstSpan)) {\n firstSpan.innerHTML = dom.ZERO_WIDTH_NBSP_CHAR;\n range.createFromNodeAfter(firstSpan.firstChild).select();\n this.$editable.data(KEY_BOGUS, firstSpan);\n }\n }\n }\n }\n\n /**\n * unlink\n *\n * @type command\n */\n unlink() {\n let rng = this.createRange();\n if (rng.isOnAnchor()) {\n const anchor = dom.ancestor(rng.sc, dom.isAnchor);\n rng = range.createFromNode(anchor);\n rng.select();\n\n this.beforeCommand();\n document.execCommand('unlink');\n this.afterCommand();\n }\n }\n\n /**\n * returns link info\n *\n * @return {Object}\n * @return {WrappedRange} return.range\n * @return {String} return.text\n * @return {Boolean} [return.isNewWindow=true]\n * @return {String} [return.url=\"\"]\n */\n getLinkInfo() {\n const rng = this.createRange().expand(dom.isAnchor);\n\n // Get the first anchor on range(for edit).\n const $anchor = $(lists.head(rng.nodes(dom.isAnchor)));\n const linkInfo = {\n range: rng,\n text: rng.toString(),\n url: $anchor.length ? $anchor.attr('href') : ''\n };\n\n // Define isNewWindow when anchor exists.\n if ($anchor.length) {\n linkInfo.isNewWindow = $anchor.attr('target') === '_blank';\n }\n\n return linkInfo;\n }\n\n addRow(position) {\n const rng = this.createRange(this.$editable);\n if (rng.isCollapsed() && rng.isOnCell()) {\n this.beforeCommand();\n this.table.addRow(rng, position);\n this.afterCommand();\n }\n }\n\n addCol(position) {\n const rng = this.createRange(this.$editable);\n if (rng.isCollapsed() && rng.isOnCell()) {\n this.beforeCommand();\n this.table.addCol(rng, position);\n this.afterCommand();\n }\n }\n\n deleteRow() {\n const rng = this.createRange(this.$editable);\n if (rng.isCollapsed() && rng.isOnCell()) {\n this.beforeCommand();\n this.table.deleteRow(rng);\n this.afterCommand();\n }\n }\n\n deleteCol() {\n const rng = this.createRange(this.$editable);\n if (rng.isCollapsed() && rng.isOnCell()) {\n this.beforeCommand();\n this.table.deleteCol(rng);\n this.afterCommand();\n }\n }\n\n deleteTable() {\n const rng = this.createRange(this.$editable);\n if (rng.isCollapsed() && rng.isOnCell()) {\n this.beforeCommand();\n this.table.deleteTable(rng);\n this.afterCommand();\n }\n }\n\n /**\n * @param {Position} pos\n * @param {jQuery} $target - target element\n * @param {Boolean} [bKeepRatio] - keep ratio\n */\n resizeTo(pos, $target, bKeepRatio) {\n let imageSize;\n if (bKeepRatio) {\n const newRatio = pos.y / pos.x;\n const ratio = $target.data('ratio');\n imageSize = {\n width: ratio > newRatio ? pos.x : pos.y / ratio,\n height: ratio > newRatio ? pos.x * ratio : pos.y\n };\n } else {\n imageSize = {\n width: pos.x,\n height: pos.y\n };\n }\n\n $target.css(imageSize);\n }\n\n /**\n * returns whether editable area has focus or not.\n */\n hasFocus() {\n return this.$editable.is(':focus');\n }\n\n /**\n * set focus\n */\n focus() {\n // [workaround] Screen will move when page is scolled in IE.\n // - do focus when not focused\n if (!this.hasFocus()) {\n this.$editable.focus();\n }\n }\n\n /**\n * returns whether contents is empty or not.\n * @return {Boolean}\n */\n isEmpty() {\n return dom.isEmpty(this.$editable[0]) || dom.emptyPara === this.$editable.html();\n }\n\n /**\n * Removes all contents and restores the editable instance to an _emptyPara_.\n */\n empty() {\n this.context.invoke('code', dom.emptyPara);\n }\n}\n","import lists from '../core/lists';\n\nexport default class Clipboard {\n constructor(context) {\n this.context = context;\n this.$editable = context.layoutInfo.editable;\n }\n\n initialize() {\n this.$editable.on('paste', this.pasteByEvent.bind(this));\n }\n\n /**\n * paste by clipboard event\n *\n * @param {Event} event\n */\n pasteByEvent(event) {\n const clipboardData = event.originalEvent.clipboardData;\n if (clipboardData && clipboardData.items && clipboardData.items.length) {\n const item = lists.head(clipboardData.items);\n if (item.kind === 'file' && item.type.indexOf('image/') !== -1) {\n this.context.invoke('editor.insertImagesOrCallback', [item.getAsFile()]);\n }\n this.context.invoke('editor.afterCommand');\n }\n }\n}\n","import $ from 'jquery';\n\nexport default class Dropzone {\n constructor(context) {\n this.context = context;\n this.$eventListener = $(document);\n this.$editor = context.layoutInfo.editor;\n this.$editable = context.layoutInfo.editable;\n this.options = context.options;\n this.lang = this.options.langInfo;\n this.documentEventHandlers = {};\n\n this.$dropzone = $([\n '<div class=\"note-dropzone\">',\n ' <div class=\"note-dropzone-message\"/>',\n '</div>'\n ].join('')).prependTo(this.$editor);\n }\n\n /**\n * attach Drag and Drop Events\n */\n initialize() {\n if (this.options.disableDragAndDrop) {\n // prevent default drop event\n this.documentEventHandlers.onDrop = (e) => {\n e.preventDefault();\n };\n // do not consider outside of dropzone\n this.$eventListener = this.$dropzone;\n this.$eventListener.on('drop', this.documentEventHandlers.onDrop);\n } else {\n this.attachDragAndDropEvent();\n }\n }\n\n /**\n * attach Drag and Drop Events\n */\n attachDragAndDropEvent() {\n let collection = $();\n const $dropzoneMessage = this.$dropzone.find('.note-dropzone-message');\n\n this.documentEventHandlers.onDragenter = (e) => {\n const isCodeview = this.context.invoke('codeview.isActivated');\n const hasEditorSize = this.$editor.width() > 0 && this.$editor.height() > 0;\n if (!isCodeview && !collection.length && hasEditorSize) {\n this.$editor.addClass('dragover');\n this.$dropzone.width(this.$editor.width());\n this.$dropzone.height(this.$editor.height());\n $dropzoneMessage.text(this.lang.image.dragImageHere);\n }\n collection = collection.add(e.target);\n };\n\n this.documentEventHandlers.onDragleave = (e) => {\n collection = collection.not(e.target);\n if (!collection.length) {\n this.$editor.removeClass('dragover');\n }\n };\n\n this.documentEventHandlers.onDrop = () => {\n collection = $();\n this.$editor.removeClass('dragover');\n };\n\n // show dropzone on dragenter when dragging a object to document\n // -but only if the editor is visible, i.e. has a positive width and height\n this.$eventListener.on('dragenter', this.documentEventHandlers.onDragenter)\n .on('dragleave', this.documentEventHandlers.onDragleave)\n .on('drop', this.documentEventHandlers.onDrop);\n\n // change dropzone's message on hover.\n this.$dropzone.on('dragenter', () => {\n this.$dropzone.addClass('hover');\n $dropzoneMessage.text(this.lang.image.dropImage);\n }).on('dragleave', () => {\n this.$dropzone.removeClass('hover');\n $dropzoneMessage.text(this.lang.image.dragImageHere);\n });\n\n // attach dropImage\n this.$dropzone.on('drop', (event) => {\n const dataTransfer = event.originalEvent.dataTransfer;\n\n // stop the browser from opening the dropped content\n event.preventDefault();\n\n if (dataTransfer && dataTransfer.files && dataTransfer.files.length) {\n this.$editable.focus();\n this.context.invoke('editor.insertImagesOrCallback', dataTransfer.files);\n } else {\n $.each(dataTransfer.types, (idx, type) => {\n const content = dataTransfer.getData(type);\n\n if (type.toLowerCase().indexOf('text') > -1) {\n this.context.invoke('editor.pasteHTML', content);\n } else {\n $(content).each((idx, item) => {\n this.context.invoke('editor.insertNode', item);\n });\n }\n });\n }\n }).on('dragover', false); // prevent default dragover event\n }\n\n destroy() {\n Object.keys(this.documentEventHandlers).forEach((key) => {\n this.$eventListener.off(key.substr(2).toLowerCase(), this.documentEventHandlers[key]);\n });\n this.documentEventHandlers = {};\n }\n}\n","import env from '../core/env';\nimport dom from '../core/dom';\n\nlet CodeMirror;\nif (env.hasCodeMirror) {\n if (env.isSupportAmd) {\n require(['codemirror'], function(cm) {\n CodeMirror = cm;\n });\n } else {\n CodeMirror = window.CodeMirror;\n }\n}\n\n/**\n * @class Codeview\n */\nexport default class CodeView {\n constructor(context) {\n this.context = context;\n this.$editor = context.layoutInfo.editor;\n this.$editable = context.layoutInfo.editable;\n this.$codable = context.layoutInfo.codable;\n this.options = context.options;\n }\n\n sync() {\n const isCodeview = this.isActivated();\n if (isCodeview && env.hasCodeMirror) {\n this.$codable.data('cmEditor').save();\n }\n }\n\n /**\n * @return {Boolean}\n */\n isActivated() {\n return this.$editor.hasClass('codeview');\n }\n\n /**\n * toggle codeview\n */\n toggle() {\n if (this.isActivated()) {\n this.deactivate();\n } else {\n this.activate();\n }\n this.context.triggerEvent('codeview.toggled');\n }\n\n /**\n * activate code view\n */\n activate() {\n this.$codable.val(dom.html(this.$editable, this.options.prettifyHtml));\n this.$codable.height(this.$editable.height());\n\n this.context.invoke('toolbar.updateCodeview', true);\n this.$editor.addClass('codeview');\n this.$codable.focus();\n\n // activate CodeMirror as codable\n if (env.hasCodeMirror) {\n const cmEditor = CodeMirror.fromTextArea(this.$codable[0], this.options.codemirror);\n\n // CodeMirror TernServer\n if (this.options.codemirror.tern) {\n const server = new CodeMirror.TernServer(this.options.codemirror.tern);\n cmEditor.ternServer = server;\n cmEditor.on('cursorActivity', (cm) => {\n server.updateArgHints(cm);\n });\n }\n\n cmEditor.on('blur', (event) => {\n this.context.triggerEvent('blur.codeview', cmEditor.getValue(), event);\n });\n\n // CodeMirror hasn't Padding.\n cmEditor.setSize(null, this.$editable.outerHeight());\n this.$codable.data('cmEditor', cmEditor);\n } else {\n this.$codable.on('blur', (event) => {\n this.context.triggerEvent('blur.codeview', this.$codable.val(), event);\n });\n }\n }\n\n /**\n * deactivate code view\n */\n deactivate() {\n // deactivate CodeMirror as codable\n if (env.hasCodeMirror) {\n const cmEditor = this.$codable.data('cmEditor');\n this.$codable.val(cmEditor.getValue());\n cmEditor.toTextArea();\n }\n\n const value = dom.value(this.$codable, this.options.prettifyHtml) || dom.emptyPara;\n const isChange = this.$editable.html() !== value;\n\n this.$editable.html(value);\n this.$editable.height(this.options.height ? this.$codable.height() : 'auto');\n this.$editor.removeClass('codeview');\n\n if (isChange) {\n this.context.triggerEvent('change', this.$editable.html(), this.$editable);\n }\n\n this.$editable.focus();\n\n this.context.invoke('toolbar.updateCodeview', false);\n }\n\n destroy() {\n if (this.isActivated()) {\n this.deactivate();\n }\n }\n}\n","import $ from 'jquery';\nconst EDITABLE_PADDING = 24;\n\nexport default class Statusbar {\n constructor(context) {\n this.$document = $(document);\n this.$statusbar = context.layoutInfo.statusbar;\n this.$editable = context.layoutInfo.editable;\n this.options = context.options;\n }\n\n initialize() {\n if (this.options.airMode || this.options.disableResizeEditor) {\n this.destroy();\n return;\n }\n\n this.$statusbar.on('mousedown', (event) => {\n event.preventDefault();\n event.stopPropagation();\n\n const editableTop = this.$editable.offset().top - this.$document.scrollTop();\n const onMouseMove = (event) => {\n let height = event.clientY - (editableTop + EDITABLE_PADDING);\n\n height = (this.options.minheight > 0) ? Math.max(height, this.options.minheight) : height;\n height = (this.options.maxHeight > 0) ? Math.min(height, this.options.maxHeight) : height;\n\n this.$editable.height(height);\n };\n\n this.$document.on('mousemove', onMouseMove).one('mouseup', () => {\n this.$document.off('mousemove', onMouseMove);\n });\n });\n }\n\n destroy() {\n this.$statusbar.off();\n }\n}\n","import $ from 'jquery';\n\nexport default class Fullscreen {\n constructor(context) {\n this.context = context;\n\n this.$editor = context.layoutInfo.editor;\n this.$toolbar = context.layoutInfo.toolbar;\n this.$editable = context.layoutInfo.editable;\n this.$codable = context.layoutInfo.codable;\n\n this.$window = $(window);\n this.$scrollbar = $('html, body');\n\n this.onResize = () => {\n this.resizeTo({\n h: this.$window.height() - this.$toolbar.outerHeight()\n });\n };\n }\n\n resizeTo(size) {\n this.$editable.css('height', size.h);\n this.$codable.css('height', size.h);\n if (this.$codable.data('cmeditor')) {\n this.$codable.data('cmeditor').setsize(null, size.h);\n }\n }\n\n /**\n * toggle fullscreen\n */\n toggle() {\n this.$editor.toggleClass('fullscreen');\n if (this.isFullscreen()) {\n this.$editable.data('orgHeight', this.$editable.css('height'));\n this.$window.on('resize', this.onResize).trigger('resize');\n this.$scrollbar.css('overflow', 'hidden');\n } else {\n this.$window.off('resize', this.onResize);\n this.resizeTo({ h: this.$editable.data('orgHeight') });\n this.$scrollbar.css('overflow', 'visible');\n }\n\n this.context.invoke('toolbar.updateFullscreen', this.isFullscreen());\n }\n\n isFullscreen() {\n return this.$editor.hasClass('fullscreen');\n }\n}\n","import $ from 'jquery';\nimport dom from '../core/dom';\n\nexport default class Handle {\n constructor(context) {\n this.context = context;\n this.$document = $(document);\n this.$editingArea = context.layoutInfo.editingArea;\n this.options = context.options;\n this.lang = this.options.langInfo;\n\n this.events = {\n 'summernote.mousedown': (we, e) => {\n if (this.update(e.target)) {\n e.preventDefault();\n }\n },\n 'summernote.keyup summernote.scroll summernote.change summernote.dialog.shown': () => {\n this.update();\n },\n 'summernote.disable': () => {\n this.hide();\n },\n 'summernote.codeview.toggled': () => {\n this.update();\n }\n };\n }\n\n initialize() {\n this.$handle = $([\n '<div class=\"note-handle\">',\n '<div class=\"note-control-selection\">',\n '<div class=\"note-control-selection-bg\"></div>',\n '<div class=\"note-control-holder note-control-nw\"></div>',\n '<div class=\"note-control-holder note-control-ne\"></div>',\n '<div class=\"note-control-holder note-control-sw\"></div>',\n '<div class=\"',\n (this.options.disableResizeImage ? 'note-control-holder' : 'note-control-sizing'),\n ' note-control-se\"></div>',\n (this.options.disableResizeImage ? '' : '<div class=\"note-control-selection-info\"></div>'),\n '</div>',\n '</div>'\n ].join('')).prependTo(this.$editingArea);\n\n this.$handle.on('mousedown', (event) => {\n if (dom.isControlSizing(event.target)) {\n event.preventDefault();\n event.stopPropagation();\n\n const $target = this.$handle.find('.note-control-selection').data('target');\n const posStart = $target.offset();\n const scrollTop = this.$document.scrollTop();\n\n const onMouseMove = (event) => {\n this.context.invoke('editor.resizeTo', {\n x: event.clientX - posStart.left,\n y: event.clientY - (posStart.top - scrollTop)\n }, $target, !event.shiftKey);\n\n this.update($target[0]);\n };\n\n this.$document\n .on('mousemove', onMouseMove)\n .one('mouseup', (e) => {\n e.preventDefault();\n this.$document.off('mousemove', onMouseMove);\n this.context.invoke('editor.afterCommand');\n });\n\n if (!$target.data('ratio')) { // original ratio.\n $target.data('ratio', $target.height() / $target.width());\n }\n }\n });\n\n // Listen for scrolling on the handle overlay.\n this.$handle.on('wheel', (e) => {\n e.preventDefault();\n this.update();\n });\n }\n\n destroy() {\n this.$handle.remove();\n }\n\n update(target) {\n if (this.context.isDisabled()) {\n return false;\n }\n\n const isImage = dom.isImg(target);\n const $selection = this.$handle.find('.note-control-selection');\n\n this.context.invoke('imagePopover.update', target);\n\n if (isImage) {\n const $image = $(target);\n const position = $image.position();\n const pos = {\n left: position.left + parseInt($image.css('marginLeft'), 10),\n top: position.top + parseInt($image.css('marginTop'), 10)\n };\n\n // exclude margin\n const imageSize = {\n w: $image.outerWidth(false),\n h: $image.outerHeight(false)\n };\n\n $selection.css({\n display: 'block',\n left: pos.left,\n top: pos.top,\n width: imageSize.w,\n height: imageSize.h\n }).data('target', $image); // save current image element.\n\n const origImageObj = new Image();\n origImageObj.src = $image.attr('src');\n\n const sizingText = imageSize.w + 'x' + imageSize.h + ' (' + this.lang.image.original + ': ' + origImageObj.width + 'x' + origImageObj.height + ')';\n $selection.find('.note-control-selection-info').text(sizingText);\n this.context.invoke('editor.saveTarget', target);\n } else {\n this.hide();\n }\n\n return isImage;\n }\n\n /**\n * hide\n *\n * @param {jQuery} $handle\n */\n hide() {\n this.context.invoke('editor.clearTarget');\n this.$handle.children().hide();\n }\n}\n","import $ from 'jquery';\nimport lists from '../core/lists';\nimport key from '../core/key';\n\nconst defaultScheme = 'http://';\nconst linkPattern = /^([A-Za-z][A-Za-z0-9+-.]*\\:[\\/\\/]?|mailto:[A-Z0-9._%+-]+@)?(www\\.)?(.+)$/i;\n\nexport default class AutoLink {\n constructor(context) {\n this.context = context;\n this.events = {\n 'summernote.keyup': (we, e) => {\n if (!e.isDefaultPrevented()) {\n this.handleKeyup(e);\n }\n },\n 'summernote.keydown': (we, e) => {\n this.handleKeydown(e);\n }\n };\n }\n\n initialize() {\n this.lastWordRange = null;\n }\n\n destroy() {\n this.lastWordRange = null;\n }\n\n replace() {\n if (!this.lastWordRange) {\n return;\n }\n\n const keyword = this.lastWordRange.toString();\n const match = keyword.match(linkPattern);\n\n if (match && (match[1] || match[2])) {\n const link = match[1] ? keyword : defaultScheme + keyword;\n const node = $('<a />').html(keyword).attr('href', link)[0];\n\n this.lastWordRange.insertNode(node);\n this.lastWordRange = null;\n this.context.invoke('editor.focus');\n }\n }\n\n handleKeydown(e) {\n if (lists.contains([key.code.ENTER, key.code.SPACE], e.keyCode)) {\n const wordRange = this.context.invoke('editor.createRange').getWordRange();\n this.lastWordRange = wordRange;\n }\n }\n\n handleKeyup(e) {\n if (lists.contains([key.code.ENTER, key.code.SPACE], e.keyCode)) {\n this.replace();\n }\n }\n}\n","import dom from '../core/dom';\n\n/**\n * textarea auto sync.\n */\nexport default class AutoSync {\n constructor(context) {\n this.$note = context.layoutInfo.note;\n this.events = {\n 'summernote.change': () => {\n this.$note.val(context.invoke('code'));\n }\n };\n }\n\n shouldInitialize() {\n return dom.isTextarea(this.$note[0]);\n }\n}\n","import $ from 'jquery';\nexport default class Placeholder {\n constructor(context) {\n this.context = context;\n\n this.$editingArea = context.layoutInfo.editingArea;\n this.options = context.options;\n this.events = {\n 'summernote.init summernote.change': () => {\n this.update();\n },\n 'summernote.codeview.toggled': () => {\n this.update();\n }\n };\n }\n\n shouldInitialize() {\n return !!this.options.placeholder;\n }\n\n initialize() {\n this.$placeholder = $('<div class=\"note-placeholder\">');\n this.$placeholder.on('click', () => {\n this.context.invoke('focus');\n }).text(this.options.placeholder).prependTo(this.$editingArea);\n\n this.update();\n }\n\n destroy() {\n this.$placeholder.remove();\n }\n\n update() {\n const isShow = !this.context.invoke('codeview.isActivated') && this.context.invoke('editor.isEmpty');\n this.$placeholder.toggle(isShow);\n }\n}\n","import $ from 'jquery';\nimport func from '../core/func';\nimport lists from '../core/lists';\nimport env from '../core/env';\n\nexport default class Buttons {\n constructor(context) {\n this.ui = $.summernote.ui;\n this.context = context;\n this.$toolbar = context.layoutInfo.toolbar;\n this.options = context.options;\n this.lang = this.options.langInfo;\n this.invertedKeyMap = func.invertObject(\n this.options.keyMap[env.isMac ? 'mac' : 'pc']\n );\n }\n\n representShortcut(editorMethod) {\n let shortcut = this.invertedKeyMap[editorMethod];\n if (!this.options.shortcuts || !shortcut) {\n return '';\n }\n\n if (env.isMac) {\n shortcut = shortcut.replace('CMD', '⌘').replace('SHIFT', '⇧');\n }\n\n shortcut = shortcut.replace('BACKSLASH', '\\\\')\n .replace('SLASH', '/')\n .replace('LEFTBRACKET', '[')\n .replace('RIGHTBRACKET', ']');\n\n return ' (' + shortcut + ')';\n }\n\n button(o) {\n if (!this.options.tooltip && o.tooltip) {\n delete o.tooltip;\n }\n o.container = this.options.container;\n return this.ui.button(o);\n }\n\n initialize() {\n this.addToolbarButtons();\n this.addImagePopoverButtons();\n this.addLinkPopoverButtons();\n this.addTablePopoverButtons();\n this.fontInstalledMap = {};\n }\n\n destroy() {\n delete this.fontInstalledMap;\n }\n\n isFontInstalled(name) {\n if (!this.fontInstalledMap.hasOwnProperty(name)) {\n this.fontInstalledMap[name] = env.isFontInstalled(name) ||\n lists.contains(this.options.fontNamesIgnoreCheck, name);\n }\n\n return this.fontInstalledMap[name];\n }\n\n isFontDeservedToAdd(name) {\n const genericFamilies = ['sans-serif', 'serif', 'monospace', 'cursive', 'fantasy'];\n name = name.toLowerCase();\n\n return ((name !== '') && this.isFontInstalled(name) && ($.inArray(name, genericFamilies) === -1));\n }\n\n addToolbarButtons() {\n this.context.memo('button.style', () => {\n return this.ui.buttonGroup([\n this.button({\n className: 'dropdown-toggle',\n contents: this.ui.dropdownButtonContents(\n this.ui.icon(this.options.icons.magic), this.options\n ),\n tooltip: this.lang.style.style,\n data: {\n toggle: 'dropdown'\n }\n }),\n this.ui.dropdown({\n className: 'dropdown-style',\n items: this.options.styleTags,\n template: (item) => {\n if (typeof item === 'string') {\n item = { tag: item, title: (this.lang.style.hasOwnProperty(item) ? this.lang.style[item] : item) };\n }\n\n const tag = item.tag;\n const title = item.title;\n const style = item.style ? ' style=\"' + item.style + '\" ' : '';\n const className = item.className ? ' class=\"' + item.className + '\"' : '';\n\n return '<' + tag + style + className + '>' + title + '</' + tag + '>';\n },\n click: this.context.createInvokeHandler('editor.formatBlock')\n })\n ]).render();\n });\n\n for (let styleIdx = 0, styleLen = this.options.styleTags.length; styleIdx < styleLen; styleIdx++) {\n const item = this.options.styleTags[styleIdx];\n\n this.context.memo('button.style.' + item, () => {\n return this.button({\n className: 'note-btn-style-' + item,\n contents: '<div data-value=\"' + item + '\">' + item.toUpperCase() + '</div>',\n tooltip: item.toUpperCase(),\n click: this.context.createInvokeHandler('editor.formatBlock')\n }).render();\n });\n }\n\n this.context.memo('button.bold', () => {\n return this.button({\n className: 'note-btn-bold',\n contents: this.ui.icon(this.options.icons.bold),\n tooltip: this.lang.font.bold + this.representShortcut('bold'),\n click: this.context.createInvokeHandlerAndUpdateState('editor.bold')\n }).render();\n });\n\n this.context.memo('button.italic', () => {\n return this.button({\n className: 'note-btn-italic',\n contents: this.ui.icon(this.options.icons.italic),\n tooltip: this.lang.font.italic + this.representShortcut('italic'),\n click: this.context.createInvokeHandlerAndUpdateState('editor.italic')\n }).render();\n });\n\n this.context.memo('button.underline', () => {\n return this.button({\n className: 'note-btn-underline',\n contents: this.ui.icon(this.options.icons.underline),\n tooltip: this.lang.font.underline + this.representShortcut('underline'),\n click: this.context.createInvokeHandlerAndUpdateState('editor.underline')\n }).render();\n });\n\n this.context.memo('button.clear', () => {\n return this.button({\n contents: this.ui.icon(this.options.icons.eraser),\n tooltip: this.lang.font.clear + this.representShortcut('removeFormat'),\n click: this.context.createInvokeHandler('editor.removeFormat')\n }).render();\n });\n\n this.context.memo('button.strikethrough', () => {\n return this.button({\n className: 'note-btn-strikethrough',\n contents: this.ui.icon(this.options.icons.strikethrough),\n tooltip: this.lang.font.strikethrough + this.representShortcut('strikethrough'),\n click: this.context.createInvokeHandlerAndUpdateState('editor.strikethrough')\n }).render();\n });\n\n this.context.memo('button.superscript', () => {\n return this.button({\n className: 'note-btn-superscript',\n contents: this.ui.icon(this.options.icons.superscript),\n tooltip: this.lang.font.superscript,\n click: this.context.createInvokeHandlerAndUpdateState('editor.superscript')\n }).render();\n });\n\n this.context.memo('button.subscript', () => {\n return this.button({\n className: 'note-btn-subscript',\n contents: this.ui.icon(this.options.icons.subscript),\n tooltip: this.lang.font.subscript,\n click: this.context.createInvokeHandlerAndUpdateState('editor.subscript')\n }).render();\n });\n\n this.context.memo('button.fontname', () => {\n const styleInfo = this.context.invoke('editor.currentStyle');\n\n // Add 'default' fonts into the fontnames array if not exist\n $.each(styleInfo['font-family'].split(','), (idx, fontname) => {\n fontname = fontname.trim().replace(/['\"]+/g, '');\n if (this.isFontDeservedToAdd(fontname)) {\n if ($.inArray(fontname, this.options.fontNames) === -1) {\n this.options.fontNames.push(fontname);\n }\n }\n });\n\n return this.ui.buttonGroup([\n this.button({\n className: 'dropdown-toggle',\n contents: this.ui.dropdownButtonContents(\n '<span class=\"note-current-fontname\"/>', this.options\n ),\n tooltip: this.lang.font.name,\n data: {\n toggle: 'dropdown'\n }\n }),\n this.ui.dropdownCheck({\n className: 'dropdown-fontname',\n checkClassName: this.options.icons.menuCheck,\n items: this.options.fontNames.filter(this.isFontInstalled.bind(this)),\n template: (item) => {\n return '<span style=\"font-family: \\'' + item + '\\'\">' + item + '</span>';\n },\n click: this.context.createInvokeHandlerAndUpdateState('editor.fontName')\n })\n ]).render();\n });\n\n this.context.memo('button.fontsize', () => {\n return this.ui.buttonGroup([\n this.button({\n className: 'dropdown-toggle',\n contents: this.ui.dropdownButtonContents('<span class=\"note-current-fontsize\"/>', this.options),\n tooltip: this.lang.font.size,\n data: {\n toggle: 'dropdown'\n }\n }),\n this.ui.dropdownCheck({\n className: 'dropdown-fontsize',\n checkClassName: this.options.icons.menuCheck,\n items: this.options.fontSizes,\n click: this.context.createInvokeHandlerAndUpdateState('editor.fontSize')\n })\n ]).render();\n });\n\n this.context.memo('button.color', () => {\n return this.ui.buttonGroup({\n className: 'note-color',\n children: [\n this.button({\n className: 'note-current-color-button',\n contents: this.ui.icon(this.options.icons.font + ' note-recent-color'),\n tooltip: this.lang.color.recent,\n click: (e) => {\n const $button = $(e.currentTarget);\n this.context.invoke('editor.color', {\n backColor: $button.attr('data-backColor'),\n foreColor: $button.attr('data-foreColor')\n });\n },\n callback: ($button) => {\n const $recentColor = $button.find('.note-recent-color');\n $recentColor.css('background-color', '#FFFF00');\n $button.attr('data-backColor', '#FFFF00');\n }\n }),\n this.button({\n className: 'dropdown-toggle',\n contents: this.ui.dropdownButtonContents('', this.options),\n tooltip: this.lang.color.more,\n data: {\n toggle: 'dropdown'\n }\n }),\n this.ui.dropdown({\n items: [\n '<div class=\"note-palette\">',\n ' <div class=\"note-palette-title\">' + this.lang.color.background + '</div>',\n ' <div>',\n ' <button type=\"button\" class=\"note-color-reset btn btn-light\" data-event=\"backColor\" data-value=\"inherit\">',\n this.lang.color.transparent,\n ' </button>',\n ' </div>',\n ' <div class=\"note-holder\" data-event=\"backColor\"/>',\n '</div>',\n '<div class=\"note-palette\">',\n ' <div class=\"note-palette-title\">' + this.lang.color.foreground + '</div>',\n ' <div>',\n ' <button type=\"button\" class=\"note-color-reset btn btn-light\" data-event=\"removeFormat\" data-value=\"foreColor\">',\n this.lang.color.resetToDefault,\n ' </button>',\n ' </div>',\n ' <div class=\"note-holder\" data-event=\"foreColor\"/>',\n '</div>'\n ].join(''),\n callback: ($dropdown) => {\n $dropdown.find('.note-holder').each((idx, item) => {\n const $holder = $(item);\n $holder.append(this.ui.palette({\n colors: this.options.colors,\n eventName: $holder.data('event'),\n container: this.options.container,\n tooltip: this.options.tooltip\n }).render());\n });\n },\n click: (event) => {\n const $button = $(event.target);\n const eventName = $button.data('event');\n const value = $button.data('value');\n\n if (eventName && value) {\n const key = eventName === 'backColor' ? 'background-color' : 'color';\n const $color = $button.closest('.note-color').find('.note-recent-color');\n const $currentButton = $button.closest('.note-color').find('.note-current-color-button');\n\n $color.css(key, value);\n $currentButton.attr('data-' + eventName, value);\n this.context.invoke('editor.' + eventName, value);\n }\n }\n })\n ]\n }).render();\n });\n\n this.context.memo('button.ul', () => {\n return this.button({\n contents: this.ui.icon(this.options.icons.unorderedlist),\n tooltip: this.lang.lists.unordered + this.representShortcut('insertUnorderedList'),\n click: this.context.createInvokeHandler('editor.insertUnorderedList')\n }).render();\n });\n\n this.context.memo('button.ol', () => {\n return this.button({\n contents: this.ui.icon(this.options.icons.orderedlist),\n tooltip: this.lang.lists.ordered + this.representShortcut('insertOrderedList'),\n click: this.context.createInvokeHandler('editor.insertOrderedList')\n }).render();\n });\n\n const justifyLeft = this.button({\n contents: this.ui.icon(this.options.icons.alignLeft),\n tooltip: this.lang.paragraph.left + this.representShortcut('justifyLeft'),\n click: this.context.createInvokeHandler('editor.justifyLeft')\n });\n\n const justifyCenter = this.button({\n contents: this.ui.icon(this.options.icons.alignCenter),\n tooltip: this.lang.paragraph.center + this.representShortcut('justifyCenter'),\n click: this.context.createInvokeHandler('editor.justifyCenter')\n });\n\n const justifyRight = this.button({\n contents: this.ui.icon(this.options.icons.alignRight),\n tooltip: this.lang.paragraph.right + this.representShortcut('justifyRight'),\n click: this.context.createInvokeHandler('editor.justifyRight')\n });\n\n const justifyFull = this.button({\n contents: this.ui.icon(this.options.icons.alignJustify),\n tooltip: this.lang.paragraph.justify + this.representShortcut('justifyFull'),\n click: this.context.createInvokeHandler('editor.justifyFull')\n });\n\n const outdent = this.button({\n contents: this.ui.icon(this.options.icons.outdent),\n tooltip: this.lang.paragraph.outdent + this.representShortcut('outdent'),\n click: this.context.createInvokeHandler('editor.outdent')\n });\n\n const indent = this.button({\n contents: this.ui.icon(this.options.icons.indent),\n tooltip: this.lang.paragraph.indent + this.representShortcut('indent'),\n click: this.context.createInvokeHandler('editor.indent')\n });\n\n this.context.memo('button.justifyLeft', func.invoke(justifyLeft, 'render'));\n this.context.memo('button.justifyCenter', func.invoke(justifyCenter, 'render'));\n this.context.memo('button.justifyRight', func.invoke(justifyRight, 'render'));\n this.context.memo('button.justifyFull', func.invoke(justifyFull, 'render'));\n this.context.memo('button.outdent', func.invoke(outdent, 'render'));\n this.context.memo('button.indent', func.invoke(indent, 'render'));\n\n this.context.memo('button.paragraph', () => {\n return this.ui.buttonGroup([\n this.button({\n className: 'dropdown-toggle',\n contents: this.ui.dropdownButtonContents(this.ui.icon(this.options.icons.alignLeft), this.options),\n tooltip: this.lang.paragraph.paragraph,\n data: {\n toggle: 'dropdown'\n }\n }),\n this.ui.dropdown([\n this.ui.buttonGroup({\n className: 'note-align',\n children: [justifyLeft, justifyCenter, justifyRight, justifyFull]\n }),\n this.ui.buttonGroup({\n className: 'note-list',\n children: [outdent, indent]\n })\n ])\n ]).render();\n });\n\n this.context.memo('button.height', () => {\n return this.ui.buttonGroup([\n this.button({\n className: 'dropdown-toggle',\n contents: this.ui.dropdownButtonContents(this.ui.icon(this.options.icons.textHeight), this.options),\n tooltip: this.lang.font.height,\n data: {\n toggle: 'dropdown'\n }\n }),\n this.ui.dropdownCheck({\n items: this.options.lineHeights,\n checkClassName: this.options.icons.menuCheck,\n className: 'dropdown-line-height',\n click: this.context.createInvokeHandler('editor.lineHeight')\n })\n ]).render();\n });\n\n this.context.memo('button.table', () => {\n return this.ui.buttonGroup([\n this.button({\n className: 'dropdown-toggle',\n contents: this.ui.dropdownButtonContents(this.ui.icon(this.options.icons.table), this.options),\n tooltip: this.lang.table.table,\n data: {\n toggle: 'dropdown'\n }\n }),\n this.ui.dropdown({\n className: 'note-table',\n items: [\n '<div class=\"note-dimension-picker\">',\n ' <div class=\"note-dimension-picker-mousecatcher\" data-event=\"insertTable\" data-value=\"1x1\"/>',\n ' <div class=\"note-dimension-picker-highlighted\"/>',\n ' <div class=\"note-dimension-picker-unhighlighted\"/>',\n '</div>',\n '<div class=\"note-dimension-display\">1 x 1</div>'\n ].join('')\n })\n ], {\n callback: ($node) => {\n const $catcher = $node.find('.note-dimension-picker-mousecatcher');\n $catcher.css({\n width: this.options.insertTableMaxSize.col + 'em',\n height: this.options.insertTableMaxSize.row + 'em'\n }).mousedown(this.context.createInvokeHandler('editor.insertTable'))\n .on('mousemove', this.tableMoveHandler.bind(this));\n }\n }).render();\n });\n\n this.context.memo('button.link', () => {\n return this.button({\n contents: this.ui.icon(this.options.icons.link),\n tooltip: this.lang.link.link + this.representShortcut('linkDialog.show'),\n click: this.context.createInvokeHandler('linkDialog.show')\n }).render();\n });\n\n this.context.memo('button.picture', () => {\n return this.button({\n contents: this.ui.icon(this.options.icons.picture),\n tooltip: this.lang.image.image,\n click: this.context.createInvokeHandler('imageDialog.show')\n }).render();\n });\n\n this.context.memo('button.video', () => {\n return this.button({\n contents: this.ui.icon(this.options.icons.video),\n tooltip: this.lang.video.video,\n click: this.context.createInvokeHandler('videoDialog.show')\n }).render();\n });\n\n this.context.memo('button.hr', () => {\n return this.button({\n contents: this.ui.icon(this.options.icons.minus),\n tooltip: this.lang.hr.insert + this.representShortcut('insertHorizontalRule'),\n click: this.context.createInvokeHandler('editor.insertHorizontalRule')\n }).render();\n });\n\n this.context.memo('button.fullscreen', () => {\n return this.button({\n className: 'btn-fullscreen',\n contents: this.ui.icon(this.options.icons.arrowsAlt),\n tooltip: this.options.fullscreen,\n click: this.context.createInvokeHandler('fullscreen.toggle')\n }).render();\n });\n\n this.context.memo('button.codeview', () => {\n return this.button({\n className: 'btn-codeview',\n contents: this.ui.icon(this.options.icons.code),\n tooltip: this.options.codeview,\n click: this.context.createInvokeHandler('codeview.toggle')\n }).render();\n });\n\n this.context.memo('button.redo', () => {\n return this.button({\n contents: this.ui.icon(this.options.icons.redo),\n tooltip: this.lang.history.redo + this.representShortcut('redo'),\n click: this.context.createInvokeHandler('editor.redo')\n }).render();\n });\n\n this.context.memo('button.undo', () => {\n return this.button({\n contents: this.ui.icon(this.options.icons.undo),\n tooltip: this.lang.history.undo + this.representShortcut('undo'),\n click: this.context.createInvokeHandler('editor.undo')\n }).render();\n });\n\n this.context.memo('button.help', () => {\n return this.button({\n contents: this.ui.icon(this.options.icons.question),\n tooltip: this.options.help,\n click: this.context.createInvokeHandler('helpDialog.show')\n }).render();\n });\n }\n\n /**\n * image : [\n * ['imagesize', ['imageSize100', 'imageSize50', 'imageSize25']],\n * ['float', ['floatLeft', 'floatRight', 'floatNone' ]],\n * ['remove', ['removeMedia']]\n * ],\n */\n addImagePopoverButtons() {\n // Image Size Buttons\n this.context.memo('button.imageSize100', () => {\n return this.button({\n contents: '<span class=\"note-fontsize-10\">100%</span>',\n tooltip: this.lang.image.resizeFull,\n click: this.context.createInvokeHandler('editor.resize', '1')\n }).render();\n });\n this.context.memo('button.imageSize50', () => {\n return this.button({\n contents: '<span class=\"note-fontsize-10\">50%</span>',\n tooltip: this.lang.image.resizeHalf,\n click: this.context.createInvokeHandler('editor.resize', '0.5')\n }).render();\n });\n this.context.memo('button.imageSize25', () => {\n return this.button({\n contents: '<span class=\"note-fontsize-10\">25%</span>',\n tooltip: this.lang.image.resizeQuarter,\n click: this.context.createInvokeHandler('editor.resize', '0.25')\n }).render();\n });\n\n // Float Buttons\n this.context.memo('button.floatLeft', () => {\n return this.button({\n contents: this.ui.icon(this.options.icons.alignLeft),\n tooltip: this.lang.image.floatLeft,\n click: this.context.createInvokeHandler('editor.floatMe', 'left')\n }).render();\n });\n\n this.context.memo('button.floatRight', () => {\n return this.button({\n contents: this.ui.icon(this.options.icons.alignRight),\n tooltip: this.lang.image.floatRight,\n click: this.context.createInvokeHandler('editor.floatMe', 'right')\n }).render();\n });\n\n this.context.memo('button.floatNone', () => {\n return this.button({\n contents: this.ui.icon(this.options.icons.alignJustify),\n tooltip: this.lang.image.floatNone,\n click: this.context.createInvokeHandler('editor.floatMe', 'none')\n }).render();\n });\n\n // Remove Buttons\n this.context.memo('button.removeMedia', () => {\n return this.button({\n contents: this.ui.icon(this.options.icons.trash),\n tooltip: this.lang.image.remove,\n click: this.context.createInvokeHandler('editor.removeMedia')\n }).render();\n });\n }\n\n addLinkPopoverButtons() {\n this.context.memo('button.linkDialogShow', () => {\n return this.button({\n contents: this.ui.icon(this.options.icons.link),\n tooltip: this.lang.link.edit,\n click: this.context.createInvokeHandler('linkDialog.show')\n }).render();\n });\n\n this.context.memo('button.unlink', () => {\n return this.button({\n contents: this.ui.icon(this.options.icons.unlink),\n tooltip: this.lang.link.unlink,\n click: this.context.createInvokeHandler('editor.unlink')\n }).render();\n });\n }\n\n /**\n * table : [\n * ['add', ['addRowDown', 'addRowUp', 'addColLeft', 'addColRight']],\n * ['delete', ['deleteRow', 'deleteCol', 'deleteTable']]\n * ],\n */\n addTablePopoverButtons() {\n this.context.memo('button.addRowUp', () => {\n return this.button({\n className: 'btn-md',\n contents: this.ui.icon(this.options.icons.rowAbove),\n tooltip: this.lang.table.addRowAbove,\n click: this.context.createInvokeHandler('editor.addRow', 'top')\n }).render();\n });\n this.context.memo('button.addRowDown', () => {\n return this.button({\n className: 'btn-md',\n contents: this.ui.icon(this.options.icons.rowBelow),\n tooltip: this.lang.table.addRowBelow,\n click: this.context.createInvokeHandler('editor.addRow', 'bottom')\n }).render();\n });\n this.context.memo('button.addColLeft', () => {\n return this.button({\n className: 'btn-md',\n contents: this.ui.icon(this.options.icons.colBefore),\n tooltip: this.lang.table.addColLeft,\n click: this.context.createInvokeHandler('editor.addCol', 'left')\n }).render();\n });\n this.context.memo('button.addColRight', () => {\n return this.button({\n className: 'btn-md',\n contents: this.ui.icon(this.options.icons.colAfter),\n tooltip: this.lang.table.addColRight,\n click: this.context.createInvokeHandler('editor.addCol', 'right')\n }).render();\n });\n this.context.memo('button.deleteRow', () => {\n return this.button({\n className: 'btn-md',\n contents: this.ui.icon(this.options.icons.rowRemove),\n tooltip: this.lang.table.delRow,\n click: this.context.createInvokeHandler('editor.deleteRow')\n }).render();\n });\n this.context.memo('button.deleteCol', () => {\n return this.button({\n className: 'btn-md',\n contents: this.ui.icon(this.options.icons.colRemove),\n tooltip: this.lang.table.delCol,\n click: this.context.createInvokeHandler('editor.deleteCol')\n }).render();\n });\n this.context.memo('button.deleteTable', () => {\n return this.button({\n className: 'btn-md',\n contents: this.ui.icon(this.options.icons.trash),\n tooltip: this.lang.table.delTable,\n click: this.context.createInvokeHandler('editor.deleteTable')\n }).render();\n });\n }\n\n build($container, groups) {\n for (let groupIdx = 0, groupLen = groups.length; groupIdx < groupLen; groupIdx++) {\n const group = groups[groupIdx];\n const groupName = $.isArray(group) ? group[0] : group;\n const buttons = $.isArray(group) ? ((group.length === 1) ? [group[0]] : group[1]) : [group];\n\n const $group = this.ui.buttonGroup({\n className: 'note-' + groupName\n }).render();\n\n for (let idx = 0, len = buttons.length; idx < len; idx++) {\n const btn = this.context.memo('button.' + buttons[idx]);\n if (btn) {\n $group.append(typeof btn === 'function' ? btn(this.context) : btn);\n }\n }\n $group.appendTo($container);\n }\n }\n\n /**\n * @param {jQuery} [$container]\n */\n updateCurrentStyle($container) {\n const $cont = $container || this.$toolbar;\n\n const styleInfo = this.context.invoke('editor.currentStyle');\n this.updateBtnStates($cont, {\n '.note-btn-bold': () => {\n return styleInfo['font-bold'] === 'bold';\n },\n '.note-btn-italic': () => {\n return styleInfo['font-italic'] === 'italic';\n },\n '.note-btn-underline': () => {\n return styleInfo['font-underline'] === 'underline';\n },\n '.note-btn-subscript': () => {\n return styleInfo['font-subscript'] === 'subscript';\n },\n '.note-btn-superscript': () => {\n return styleInfo['font-superscript'] === 'superscript';\n },\n '.note-btn-strikethrough': () => {\n return styleInfo['font-strikethrough'] === 'strikethrough';\n }\n });\n\n if (styleInfo['font-family']) {\n const fontNames = styleInfo['font-family'].split(',').map((name) => {\n return name.replace(/[\\'\\\"]/g, '')\n .replace(/\\s+$/, '')\n .replace(/^\\s+/, '');\n });\n const fontName = lists.find(fontNames, this.isFontInstalled.bind(this));\n\n $cont.find('.dropdown-fontname a').each((idx, item) => {\n const $item = $(item);\n // always compare string to avoid creating another func.\n const isChecked = ($item.data('value') + '') === (fontName + '');\n $item.toggleClass('checked', isChecked);\n });\n $cont.find('.note-current-fontname').text(fontName).css('font-family', fontName);\n }\n\n if (styleInfo['font-size']) {\n const fontSize = styleInfo['font-size'];\n $cont.find('.dropdown-fontsize a').each((idx, item) => {\n const $item = $(item);\n // always compare with string to avoid creating another func.\n const isChecked = ($item.data('value') + '') === (fontSize + '');\n $item.toggleClass('checked', isChecked);\n });\n $cont.find('.note-current-fontsize').text(fontSize);\n }\n\n if (styleInfo['line-height']) {\n const lineHeight = styleInfo['line-height'];\n $cont.find('.dropdown-line-height li a').each((idx, item) => {\n // always compare with string to avoid creating another func.\n const isChecked = ($(item).data('value') + '') === (lineHeight + '');\n this.className = isChecked ? 'checked' : '';\n });\n }\n }\n\n updateBtnStates($container, infos) {\n $.each(infos, (selector, pred) => {\n this.ui.toggleBtnActive($container.find(selector), pred());\n });\n }\n\n tableMoveHandler(event) {\n const PX_PER_EM = 18;\n const $picker = $(event.target.parentNode); // target is mousecatcher\n const $dimensionDisplay = $picker.next();\n const $catcher = $picker.find('.note-dimension-picker-mousecatcher');\n const $highlighted = $picker.find('.note-dimension-picker-highlighted');\n const $unhighlighted = $picker.find('.note-dimension-picker-unhighlighted');\n\n let posOffset;\n // HTML5 with jQuery - e.offsetX is undefined in Firefox\n if (event.offsetX === undefined) {\n const posCatcher = $(event.target).offset();\n posOffset = {\n x: event.pageX - posCatcher.left,\n y: event.pageY - posCatcher.top\n };\n } else {\n posOffset = {\n x: event.offsetX,\n y: event.offsetY\n };\n }\n\n const dim = {\n c: Math.ceil(posOffset.x / PX_PER_EM) || 1,\n r: Math.ceil(posOffset.y / PX_PER_EM) || 1\n };\n\n $highlighted.css({ width: dim.c + 'em', height: dim.r + 'em' });\n $catcher.data('value', dim.c + 'x' + dim.r);\n\n if (dim.c > 3 && dim.c < this.options.insertTableMaxSize.col) {\n $unhighlighted.css({ width: dim.c + 1 + 'em' });\n }\n\n if (dim.r > 3 && dim.r < this.options.insertTableMaxSize.row) {\n $unhighlighted.css({ height: dim.r + 1 + 'em' });\n }\n\n $dimensionDisplay.html(dim.c + ' x ' + dim.r);\n }\n}\n","import $ from 'jquery';\nexport default class Toolbar {\n constructor(context) {\n this.context = context;\n\n this.$window = $(window);\n this.$document = $(document);\n\n this.ui = $.summernote.ui;\n this.$note = context.layoutInfo.note;\n this.$editor = context.layoutInfo.editor;\n this.$toolbar = context.layoutInfo.toolbar;\n this.options = context.options;\n\n this.followScroll = this.followScroll.bind(this);\n }\n\n shouldInitialize() {\n return !this.options.airMode;\n }\n\n initialize() {\n this.options.toolbar = this.options.toolbar || [];\n\n if (!this.options.toolbar.length) {\n this.$toolbar.hide();\n } else {\n this.context.invoke('buttons.build', this.$toolbar, this.options.toolbar);\n }\n\n if (this.options.toolbarContainer) {\n this.$toolbar.appendTo(this.options.toolbarContainer);\n }\n\n this.changeContainer(false);\n\n this.$note.on('summernote.keyup summernote.mouseup summernote.change', () => {\n this.context.invoke('buttons.updateCurrentStyle');\n });\n\n this.context.invoke('buttons.updateCurrentStyle');\n if (this.options.followingToolbar) {\n this.$window.on('scroll resize', this.followScroll);\n }\n }\n\n destroy() {\n this.$toolbar.children().remove();\n\n if (this.options.followingToolbar) {\n this.$window.off('scroll resize', this.followScroll);\n }\n }\n\n followScroll() {\n if (this.$editor.hasClass('fullscreen')) {\n return false;\n }\n\n const $toolbarWrapper = this.$toolbar.parent('.note-toolbar-wrapper');\n const editorHeight = this.$editor.outerHeight();\n const editorWidth = this.$editor.width();\n\n const toolbarHeight = this.$toolbar.height();\n $toolbarWrapper.css({\n height: toolbarHeight\n });\n\n // check if the web app is currently using another static bar\n let otherBarHeight = 0;\n if (this.options.otherStaticBar) {\n otherBarHeight = $(this.options.otherStaticBar).outerHeight();\n }\n\n const currentOffset = this.$document.scrollTop();\n const editorOffsetTop = this.$editor.offset().top;\n const editorOffsetBottom = editorOffsetTop + editorHeight;\n const activateOffset = editorOffsetTop - otherBarHeight;\n const deactivateOffsetBottom = editorOffsetBottom - otherBarHeight - toolbarHeight;\n\n if ((currentOffset > activateOffset) && (currentOffset < deactivateOffsetBottom)) {\n this.$toolbar.css({\n position: 'fixed',\n top: otherBarHeight,\n width: editorWidth\n });\n } else {\n this.$toolbar.css({\n position: 'relative',\n top: 0,\n width: '100%'\n });\n }\n }\n\n changeContainer(isFullscreen) {\n if (isFullscreen) {\n this.$toolbar.prependTo(this.$editor);\n } else {\n if (this.options.toolbarContainer) {\n this.$toolbar.appendTo(this.options.toolbarContainer);\n }\n }\n }\n\n updateFullscreen(isFullscreen) {\n this.ui.toggleBtnActive(this.$toolbar.find('.btn-fullscreen'), isFullscreen);\n\n this.changeContainer(isFullscreen);\n }\n\n updateCodeview(isCodeview) {\n this.ui.toggleBtnActive(this.$toolbar.find('.btn-codeview'), isCodeview);\n if (isCodeview) {\n this.deactivate();\n } else {\n this.activate();\n }\n }\n\n activate(isIncludeCodeview) {\n let $btn = this.$toolbar.find('button');\n if (!isIncludeCodeview) {\n $btn = $btn.not('.btn-codeview');\n }\n this.ui.toggleBtn($btn, true);\n }\n\n deactivate(isIncludeCodeview) {\n let $btn = this.$toolbar.find('button');\n if (!isIncludeCodeview) {\n $btn = $btn.not('.btn-codeview');\n }\n this.ui.toggleBtn($btn, false);\n }\n}\n","import $ from 'jquery';\nimport env from '../core/env';\nimport key from '../core/key';\n\nexport default class LinkDialog {\n constructor(context) {\n this.context = context;\n\n this.ui = $.summernote.ui;\n this.$body = $(document.body);\n this.$editor = context.layoutInfo.editor;\n this.options = context.options;\n this.lang = this.options.langInfo;\n\n context.memo('help.linkDialog.show', this.options.langInfo.help['linkDialog.show']);\n }\n\n initialize() {\n const $container = this.options.dialogsInBody ? this.$body : this.$editor;\n\n const body = [\n '<div class=\"form-group note-form-group\">',\n `<label class=\"note-form-label\">${this.lang.link.textToDisplay}</label>`,\n '<input class=\"note-link-text form-control note-form-control note-input\" type=\"text\" />',\n '</div>',\n '<div class=\"form-group note-form-group\">',\n `<label class=\"note-form-label\">${this.lang.link.url}</label>`,\n '<input class=\"note-link-url form-control note-form-control note-input\" type=\"text\" value=\"http://\" />',\n '</div>',\n !this.options.disableLinkTarget\n ? $('<div/>').append(this.ui.checkbox({\n id: 'sn-checkbox-open-in-new-window',\n text: this.lang.link.openInNewWindow,\n checked: true\n }).render()).html()\n : ''\n ].join('');\n\n const buttonClass = 'btn btn-primary note-btn note-btn-primary note-link-btn';\n const footer = `<button type=\"submit\" href=\"#\" class=\"${buttonClass}\" disabled>${this.lang.link.insert}</button>`;\n\n this.$dialog = this.ui.dialog({\n className: 'link-dialog',\n title: this.lang.link.insert,\n fade: this.options.dialogsFade,\n body: body,\n footer: footer\n }).render().appendTo($container);\n }\n\n destroy() {\n this.ui.hideDialog(this.$dialog);\n this.$dialog.remove();\n }\n\n bindEnterKey($input, $btn) {\n $input.on('keypress', (event) => {\n if (event.keyCode === key.code.ENTER) {\n event.preventDefault();\n $btn.trigger('click');\n }\n });\n }\n\n /**\n * toggle update button\n */\n toggleLinkBtn($linkBtn, $linkText, $linkUrl) {\n this.ui.toggleBtn($linkBtn, $linkText.val() && $linkUrl.val());\n }\n\n /**\n * Show link dialog and set event handlers on dialog controls.\n *\n * @param {Object} linkInfo\n * @return {Promise}\n */\n showLinkDialog(linkInfo) {\n return $.Deferred((deferred) => {\n const $linkText = this.$dialog.find('.note-link-text');\n const $linkUrl = this.$dialog.find('.note-link-url');\n const $linkBtn = this.$dialog.find('.note-link-btn');\n const $openInNewWindow = this.$dialog.find('input[type=checkbox]');\n\n this.ui.onDialogShown(this.$dialog, () => {\n this.context.triggerEvent('dialog.shown');\n\n // if no url was given, copy text to url\n if (!linkInfo.url) {\n linkInfo.url = linkInfo.text;\n }\n\n $linkText.val(linkInfo.text);\n\n const handleLinkTextUpdate = () => {\n this.toggleLinkBtn($linkBtn, $linkText, $linkUrl);\n // if linktext was modified by keyup,\n // stop cloning text from linkUrl\n linkInfo.text = $linkText.val();\n };\n\n $linkText.on('input', handleLinkTextUpdate).on('paste', () => {\n setTimeout(handleLinkTextUpdate, 0);\n });\n\n const handleLinkUrlUpdate = () => {\n this.toggleLinkBtn($linkBtn, $linkText, $linkUrl);\n // display same link on `Text to display` input\n // when create a new link\n if (!linkInfo.text) {\n $linkText.val($linkUrl.val());\n }\n };\n\n $linkUrl.on('input', handleLinkUrlUpdate).on('paste', () => {\n setTimeout(handleLinkUrlUpdate, 0);\n }).val(linkInfo.url);\n\n if (!env.isSupportTouch) {\n $linkUrl.trigger('focus');\n }\n\n this.toggleLinkBtn($linkBtn, $linkText, $linkUrl);\n this.bindEnterKey($linkUrl, $linkBtn);\n this.bindEnterKey($linkText, $linkBtn);\n\n const isChecked = linkInfo.isNewWindow !== undefined\n ? linkInfo.isNewWindow : this.context.options.linkTargetBlank;\n\n $openInNewWindow.prop('checked', isChecked);\n\n $linkBtn.one('click', (event) => {\n event.preventDefault();\n\n deferred.resolve({\n range: linkInfo.range,\n url: $linkUrl.val(),\n text: $linkText.val(),\n isNewWindow: $openInNewWindow.is(':checked')\n });\n this.ui.hideDialog(this.$dialog);\n });\n });\n\n this.ui.onDialogHidden(this.$dialog, () => {\n // detach events\n $linkText.off('input paste keypress');\n $linkUrl.off('input paste keypress');\n $linkBtn.off('click');\n\n if (deferred.state() === 'pending') {\n deferred.reject();\n }\n });\n\n this.ui.showDialog(this.$dialog);\n }).promise();\n }\n\n /**\n * @param {Object} layoutInfo\n */\n show() {\n const linkInfo = this.context.invoke('editor.getLinkInfo');\n\n this.context.invoke('editor.saveRange');\n this.showLinkDialog(linkInfo).then((linkInfo) => {\n this.context.invoke('editor.restoreRange');\n this.context.invoke('editor.createLink', linkInfo);\n }).fail(() => {\n this.context.invoke('editor.restoreRange');\n });\n }\n}\n","import $ from 'jquery';\nimport lists from '../core/lists';\nimport dom from '../core/dom';\n\nexport default class LinkPopover {\n constructor(context) {\n this.context = context;\n\n this.ui = $.summernote.ui;\n this.options = context.options;\n this.events = {\n 'summernote.keyup summernote.mouseup summernote.change summernote.scroll': () => {\n this.update();\n },\n 'summernote.disable summernote.dialog.shown': () => {\n this.hide();\n }\n };\n }\n\n shouldInitialize() {\n return !lists.isEmpty(this.options.popover.link);\n }\n\n initialize() {\n this.$popover = this.ui.popover({\n className: 'note-link-popover',\n callback: ($node) => {\n const $content = $node.find('.popover-content,.note-popover-content');\n $content.prepend('<span><a target=\"_blank\"></a> </span>');\n }\n }).render().appendTo(this.options.container);\n const $content = this.$popover.find('.popover-content,.note-popover-content');\n\n this.context.invoke('buttons.build', $content, this.options.popover.link);\n }\n\n destroy() {\n this.$popover.remove();\n }\n\n update() {\n // Prevent focusing on editable when invoke('code') is executed\n if (!this.context.invoke('editor.hasFocus')) {\n this.hide();\n return;\n }\n\n const rng = this.context.invoke('editor.createRange');\n if (rng.isCollapsed() && rng.isOnAnchor()) {\n const anchor = dom.ancestor(rng.sc, dom.isAnchor);\n const href = $(anchor).attr('href');\n this.$popover.find('a').attr('href', href).html(href);\n\n const pos = dom.posFromPlaceholder(anchor);\n this.$popover.css({\n display: 'block',\n left: pos.left,\n top: pos.top\n });\n } else {\n this.hide();\n }\n }\n\n hide() {\n this.$popover.hide();\n }\n}\n","import $ from 'jquery';\nimport env from '../core/env';\nimport key from '../core/key';\n\nexport default class ImageDialog {\n constructor(context) {\n this.context = context;\n this.ui = $.summernote.ui;\n this.$body = $(document.body);\n this.$editor = context.layoutInfo.editor;\n this.options = context.options;\n this.lang = this.options.langInfo;\n }\n\n initialize() {\n const $container = this.options.dialogsInBody ? this.$body : this.$editor;\n\n let imageLimitation = '';\n if (this.options.maximumImageFileSize) {\n const unit = Math.floor(Math.log(this.options.maximumImageFileSize) / Math.log(1024));\n const readableSize = (this.options.maximumImageFileSize / Math.pow(1024, unit)).toFixed(2) * 1 +\n ' ' + ' KMGTP'[unit] + 'B';\n imageLimitation = `<small>${this.lang.image.maximumFileSize + ' : ' + readableSize}</small>`;\n }\n\n const body = [\n '<div class=\"form-group note-form-group note-group-select-from-files\">',\n '<label class=\"note-form-label\">' + this.lang.image.selectFromFiles + '</label>',\n '<input class=\"note-image-input note-form-control note-input\" ',\n ' type=\"file\" name=\"files\" accept=\"image/*\" multiple=\"multiple\" />',\n imageLimitation,\n '</div>',\n '<div class=\"form-group note-group-image-url\" style=\"overflow:auto;\">',\n '<label class=\"note-form-label\">' + this.lang.image.url + '</label>',\n '<input class=\"note-image-url form-control note-form-control note-input ',\n ' col-md-12\" type=\"text\" />',\n '</div>'\n ].join('');\n const buttonClass = 'btn btn-primary note-btn note-btn-primary note-image-btn';\n const footer = `<button type=\"submit\" href=\"#\" class=\"${buttonClass}\" disabled>${this.lang.image.insert}</button>`;\n\n this.$dialog = this.ui.dialog({\n title: this.lang.image.insert,\n fade: this.options.dialogsFade,\n body: body,\n footer: footer\n }).render().appendTo($container);\n }\n\n destroy() {\n this.ui.hideDialog(this.$dialog);\n this.$dialog.remove();\n }\n\n bindEnterKey($input, $btn) {\n $input.on('keypress', (event) => {\n if (event.keyCode === key.code.ENTER) {\n event.preventDefault();\n $btn.trigger('click');\n }\n });\n }\n\n show() {\n this.context.invoke('editor.saveRange');\n this.showImageDialog().then((data) => {\n // [workaround] hide dialog before restore range for IE range focus\n this.ui.hideDialog(this.$dialog);\n this.context.invoke('editor.restoreRange');\n\n if (typeof data === 'string') { // image url\n this.context.invoke('editor.insertImage', data);\n } else { // array of files\n this.context.invoke('editor.insertImagesOrCallback', data);\n }\n }).fail(() => {\n this.context.invoke('editor.restoreRange');\n });\n }\n\n /**\n * show image dialog\n *\n * @param {jQuery} $dialog\n * @return {Promise}\n */\n showImageDialog() {\n return $.Deferred((deferred) => {\n const $imageInput = this.$dialog.find('.note-image-input');\n const $imageUrl = this.$dialog.find('.note-image-url');\n const $imageBtn = this.$dialog.find('.note-image-btn');\n\n this.ui.onDialogShown(this.$dialog, () => {\n this.context.triggerEvent('dialog.shown');\n\n // Cloning imageInput to clear element.\n $imageInput.replaceWith($imageInput.clone().on('change', (event) => {\n deferred.resolve(event.target.files || event.target.value);\n }).val(''));\n\n $imageBtn.click((event) => {\n event.preventDefault();\n\n deferred.resolve($imageUrl.val());\n });\n\n $imageUrl.on('keyup paste', () => {\n const url = $imageUrl.val();\n this.ui.toggleBtn($imageBtn, url);\n }).val('');\n\n if (!env.isSupportTouch) {\n $imageUrl.trigger('focus');\n }\n this.bindEnterKey($imageUrl, $imageBtn);\n });\n\n this.ui.onDialogHidden(this.$dialog, () => {\n $imageInput.off('change');\n $imageUrl.off('keyup paste keypress');\n $imageBtn.off('click');\n\n if (deferred.state() === 'pending') {\n deferred.reject();\n }\n });\n\n this.ui.showDialog(this.$dialog);\n });\n }\n}\n","import $ from 'jquery';\nimport lists from '../core/lists';\nimport dom from '../core/dom';\n\n/**\n * Image popover module\n * mouse events that show/hide popover will be handled by Handle.js.\n * Handle.js will receive the events and invoke 'imagePopover.update'.\n */\nexport default class ImagePopover {\n constructor(context) {\n this.context = context;\n this.ui = $.summernote.ui;\n\n this.editable = context.layoutInfo.editable[0];\n this.options = context.options;\n\n this.events = {\n 'summernote.disable': () => {\n this.hide();\n }\n };\n }\n\n shouldInitialize() {\n return !lists.isEmpty(this.options.popover.image);\n }\n\n initialize() {\n this.$popover = this.ui.popover({\n className: 'note-image-popover'\n }).render().appendTo(this.options.container);\n const $content = this.$popover.find('.popover-content,.note-popover-content');\n this.context.invoke('buttons.build', $content, this.options.popover.image);\n }\n\n destroy() {\n this.$popover.remove();\n }\n\n update(target) {\n if (dom.isImg(target)) {\n const pos = dom.posFromPlaceholder(target);\n const posEditor = dom.posFromPlaceholder(this.editable);\n this.$popover.css({\n display: 'block',\n left: this.options.popatmouse ? event.pageX - 20 : pos.left,\n top: this.options.popatmouse ? event.pageY : Math.min(pos.top, posEditor.top)\n });\n } else {\n this.hide();\n }\n }\n\n hide() {\n this.$popover.hide();\n }\n}\n","import $ from 'jquery';\nimport env from '../core/env';\nimport lists from '../core/lists';\nimport dom from '../core/dom';\n\nexport default class TablePopover {\n constructor(context) {\n this.context = context;\n\n this.ui = $.summernote.ui;\n this.options = context.options;\n this.events = {\n 'summernote.mousedown': (we, e) => {\n this.update(e.target);\n },\n 'summernote.keyup summernote.scroll summernote.change': () => {\n this.update();\n },\n 'summernote.disable': () => {\n this.hide();\n }\n };\n }\n\n shouldInitialize() {\n return !lists.isEmpty(this.options.popover.table);\n }\n\n initialize() {\n this.$popover = this.ui.popover({\n className: 'note-table-popover'\n }).render().appendTo(this.options.container);\n const $content = this.$popover.find('.popover-content,.note-popover-content');\n\n this.context.invoke('buttons.build', $content, this.options.popover.table);\n\n // [workaround] Disable Firefox's default table editor\n if (env.isFF) {\n document.execCommand('enableInlineTableEditing', false, false);\n }\n }\n\n destroy() {\n this.$popover.remove();\n }\n\n update(target) {\n if (this.context.isDisabled()) {\n return false;\n }\n\n const isCell = dom.isCell(target);\n\n if (isCell) {\n const pos = dom.posFromPlaceholder(target);\n this.$popover.css({\n display: 'block',\n left: pos.left,\n top: pos.top\n });\n } else {\n this.hide();\n }\n\n return isCell;\n }\n\n hide() {\n this.$popover.hide();\n }\n}\n","import $ from 'jquery';\nimport env from '../core/env';\nimport key from '../core/key';\n\nexport default class VideoDialog {\n constructor(context) {\n this.context = context;\n\n this.ui = $.summernote.ui;\n this.$body = $(document.body);\n this.$editor = context.layoutInfo.editor;\n this.options = context.options;\n this.lang = this.options.langInfo;\n }\n\n initialize() {\n const $container = this.options.dialogsInBody ? this.$body : this.$editor;\n\n const body = [\n '<div class=\"form-group note-form-group row-fluid\">',\n `<label class=\"note-form-label\">${this.lang.video.url} <small class=\"text-muted\">${this.lang.video.providers}</small></label>`,\n '<input class=\"note-video-url form-control note-form-control note-input\" type=\"text\" />',\n '</div>'\n ].join('');\n const buttonClass = 'btn btn-primary note-btn note-btn-primary note-video-btn';\n const footer = `<button type=\"submit\" href=\"#\" class=\"${buttonClass}\" disabled>${this.lang.video.insert}</button>`;\n\n this.$dialog = this.ui.dialog({\n title: this.lang.video.insert,\n fade: this.options.dialogsFade,\n body: body,\n footer: footer\n }).render().appendTo($container);\n }\n\n destroy() {\n this.ui.hideDialog(this.$dialog);\n this.$dialog.remove();\n }\n\n bindEnterKey($input, $btn) {\n $input.on('keypress', (event) => {\n if (event.keyCode === key.code.ENTER) {\n event.preventDefault();\n $btn.trigger('click');\n }\n });\n }\n\n createVideoNode(url) {\n // video url patterns(youtube, instagram, vimeo, dailymotion, youku, mp4, ogg, webm)\n const ytRegExp = /^(?:https?:\\/\\/)?(?:www\\.)?(?:youtu\\.be\\/|youtube\\.com\\/(?:embed\\/|v\\/|watch\\?v=|watch\\?.+&v=))((\\w|-){11})(?:\\S+)?$/;\n const ytMatch = url.match(ytRegExp);\n\n const igRegExp = /(?:www\\.|\\/\\/)instagram\\.com\\/p\\/(.[a-zA-Z0-9_-]*)/;\n const igMatch = url.match(igRegExp);\n\n const vRegExp = /\\/\\/vine\\.co\\/v\\/([a-zA-Z0-9]+)/;\n const vMatch = url.match(vRegExp);\n\n const vimRegExp = /\\/\\/(player\\.)?vimeo\\.com\\/([a-z]*\\/)*(\\d+)[?]?.*/;\n const vimMatch = url.match(vimRegExp);\n\n const dmRegExp = /.+dailymotion.com\\/(video|hub)\\/([^_]+)[^#]*(#video=([^_&]+))?/;\n const dmMatch = url.match(dmRegExp);\n\n const youkuRegExp = /\\/\\/v\\.youku\\.com\\/v_show\\/id_(\\w+)=*\\.html/;\n const youkuMatch = url.match(youkuRegExp);\n\n const qqRegExp = /\\/\\/v\\.qq\\.com.*?vid=(.+)/;\n const qqMatch = url.match(qqRegExp);\n\n const qqRegExp2 = /\\/\\/v\\.qq\\.com\\/x?\\/?(page|cover).*?\\/([^\\/]+)\\.html\\??.*/;\n const qqMatch2 = url.match(qqRegExp2);\n\n const mp4RegExp = /^.+.(mp4|m4v)$/;\n const mp4Match = url.match(mp4RegExp);\n\n const oggRegExp = /^.+.(ogg|ogv)$/;\n const oggMatch = url.match(oggRegExp);\n\n const webmRegExp = /^.+.(webm)$/;\n const webmMatch = url.match(webmRegExp);\n\n let $video;\n if (ytMatch && ytMatch[1].length === 11) {\n const youtubeId = ytMatch[1];\n $video = $('<iframe>')\n .attr('frameborder', 0)\n .attr('src', '//www.youtube.com/embed/' + youtubeId)\n .attr('width', '640').attr('height', '360');\n } else if (igMatch && igMatch[0].length) {\n $video = $('<iframe>')\n .attr('frameborder', 0)\n .attr('src', 'https://instagram.com/p/' + igMatch[1] + '/embed/')\n .attr('width', '612').attr('height', '710')\n .attr('scrolling', 'no')\n .attr('allowtransparency', 'true');\n } else if (vMatch && vMatch[0].length) {\n $video = $('<iframe>')\n .attr('frameborder', 0)\n .attr('src', vMatch[0] + '/embed/simple')\n .attr('width', '600').attr('height', '600')\n .attr('class', 'vine-embed');\n } else if (vimMatch && vimMatch[3].length) {\n $video = $('<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>')\n .attr('frameborder', 0)\n .attr('src', '//player.vimeo.com/video/' + vimMatch[3])\n .attr('width', '640').attr('height', '360');\n } else if (dmMatch && dmMatch[2].length) {\n $video = $('<iframe>')\n .attr('frameborder', 0)\n .attr('src', '//www.dailymotion.com/embed/video/' + dmMatch[2])\n .attr('width', '640').attr('height', '360');\n } else if (youkuMatch && youkuMatch[1].length) {\n $video = $('<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>')\n .attr('frameborder', 0)\n .attr('height', '498')\n .attr('width', '510')\n .attr('src', '//player.youku.com/embed/' + youkuMatch[1]);\n } else if ((qqMatch && qqMatch[1].length) || (qqMatch2 && qqMatch2[2].length)) {\n const vid = ((qqMatch && qqMatch[1].length) ? qqMatch[1] : qqMatch2[2]);\n $video = $('<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>')\n .attr('frameborder', 0)\n .attr('height', '310')\n .attr('width', '500')\n .attr('src', 'http://v.qq.com/iframe/player.html?vid=' + vid + '&auto=0');\n } else if (mp4Match || oggMatch || webmMatch) {\n $video = $('<video controls>')\n .attr('src', url)\n .attr('width', '640').attr('height', '360');\n } else {\n // this is not a known video link. Now what, Cat? Now what?\n return false;\n }\n\n $video.addClass('note-video-clip');\n\n return $video[0];\n }\n\n show() {\n const text = this.context.invoke('editor.getSelectedText');\n this.context.invoke('editor.saveRange');\n this.showVideoDialog(text).then((url) => {\n // [workaround] hide dialog before restore range for IE range focus\n this.ui.hideDialog(this.$dialog);\n this.context.invoke('editor.restoreRange');\n\n // build node\n const $node = this.createVideoNode(url);\n\n if ($node) {\n // insert video node\n this.context.invoke('editor.insertNode', $node);\n }\n }).fail(() => {\n this.context.invoke('editor.restoreRange');\n });\n }\n\n /**\n * show image dialog\n *\n * @param {jQuery} $dialog\n * @return {Promise}\n */\n showVideoDialog(text) {\n return $.Deferred((deferred) => {\n const $videoUrl = this.$dialog.find('.note-video-url');\n const $videoBtn = this.$dialog.find('.note-video-btn');\n\n this.ui.onDialogShown(this.$dialog, () => {\n this.context.triggerEvent('dialog.shown');\n\n $videoUrl.val(text).on('input', () => {\n this.ui.toggleBtn($videoBtn, $videoUrl.val());\n });\n\n if (!env.isSupportTouch) {\n $videoUrl.trigger('focus');\n }\n\n $videoBtn.click((event) => {\n event.preventDefault();\n\n deferred.resolve($videoUrl.val());\n });\n\n this.bindEnterKey($videoUrl, $videoBtn);\n });\n\n this.ui.onDialogHidden(this.$dialog, () => {\n $videoUrl.off('input');\n $videoBtn.off('click');\n\n if (deferred.state() === 'pending') {\n deferred.reject();\n }\n });\n\n this.ui.showDialog(this.$dialog);\n });\n }\n}\n","import $ from 'jquery';\nimport env from '../core/env';\n\nexport default class HelpDialog {\n constructor(context) {\n this.context = context;\n\n this.ui = $.summernote.ui;\n this.$body = $(document.body);\n this.$editor = context.layoutInfo.editor;\n this.options = context.options;\n this.lang = this.options.langInfo;\n }\n\n initialize() {\n const $container = this.options.dialogsInBody ? this.$body : this.$editor;\n\n const body = [\n '<p class=\"text-center\">',\n '<a href=\"http://summernote.org/\" target=\"_blank\">Summernote @@VERSION@@</a> · ',\n '<a href=\"https://github.com/summernote/summernote\" target=\"_blank\">Project</a> · ',\n '<a href=\"https://github.com/summernote/summernote/issues\" target=\"_blank\">Issues</a>',\n '</p>'\n ].join('');\n\n this.$dialog = this.ui.dialog({\n title: this.lang.options.help,\n fade: this.options.dialogsFade,\n body: this.createShortcutList(),\n footer: body,\n callback: ($node) => {\n $node.find('.modal-body,.note-modal-body').css({\n 'max-height': 300,\n 'overflow': 'scroll'\n });\n }\n }).render().appendTo($container);\n }\n\n destroy() {\n this.ui.hideDialog(this.$dialog);\n this.$dialog.remove();\n }\n\n createShortcutList() {\n const keyMap = this.options.keyMap[env.isMac ? 'mac' : 'pc'];\n return Object.keys(keyMap).map((key) => {\n const command = keyMap[key];\n const $row = $('<div><div class=\"help-list-item\"/></div>');\n $row.append($('<label><kbd>' + key + '</kdb></label>').css({\n 'width': 180,\n 'margin-right': 10\n })).append($('<span/>').html(this.context.memo('help.' + command) || command));\n return $row.html();\n }).join('');\n }\n\n /**\n * show help dialog\n *\n * @return {Promise}\n */\n showHelpDialog() {\n return $.Deferred((deferred) => {\n this.ui.onDialogShown(this.$dialog, () => {\n this.context.triggerEvent('dialog.shown');\n deferred.resolve();\n });\n this.ui.showDialog(this.$dialog);\n }).promise();\n }\n\n show() {\n this.context.invoke('editor.saveRange');\n this.showHelpDialog().then(() => {\n this.context.invoke('editor.restoreRange');\n });\n }\n}\n","import $ from 'jquery';\nimport env from '../core/env';\nimport func from '../core/func';\nimport lists from '../core/lists';\nimport dom from '../core/dom';\n\nconst AIR_MODE_POPOVER_X_OFFSET = 20;\n\nexport default class AirPopover {\n constructor(context) {\n this.context = context;\n this.ui = $.summernote.ui;\n this.options = context.options;\n this.events = {\n 'summernote.keyup summernote.mouseup summernote.scroll': () => {\n this.update();\n },\n 'summernote.disable summernote.change summernote.dialog.shown': () => {\n this.hide();\n },\n 'summernote.focusout': (we, e) => {\n // [workaround] Firefox doesn't support relatedTarget on focusout\n // - Ignore hide action on focus out in FF.\n if (env.isFF) {\n return;\n }\n\n if (!e.relatedTarget || !dom.ancestor(e.relatedTarget, func.eq(this.$popover[0]))) {\n this.hide();\n }\n }\n };\n }\n\n shouldInitialize() {\n return this.options.airMode && !lists.isEmpty(this.options.popover.air);\n }\n\n initialize() {\n this.$popover = this.ui.popover({\n className: 'note-air-popover'\n }).render().appendTo(this.options.container);\n const $content = this.$popover.find('.popover-content');\n\n this.context.invoke('buttons.build', $content, this.options.popover.air);\n }\n\n destroy() {\n this.$popover.remove();\n }\n\n update() {\n const styleInfo = this.context.invoke('editor.currentStyle');\n if (styleInfo.range && !styleInfo.range.isCollapsed()) {\n const rect = lists.last(styleInfo.range.getClientRects());\n if (rect) {\n const bnd = func.rect2bnd(rect);\n this.$popover.css({\n display: 'block',\n left: Math.max(bnd.left + bnd.width / 2, 0) - AIR_MODE_POPOVER_X_OFFSET,\n top: bnd.top + bnd.height\n });\n this.context.invoke('buttons.updateCurrentStyle', this.$popover);\n }\n } else {\n this.hide();\n }\n }\n\n hide() {\n this.$popover.hide();\n }\n}\n","import $ from 'jquery';\nimport func from '../core/func';\nimport lists from '../core/lists';\nimport dom from '../core/dom';\nimport range from '../core/range';\nimport key from '../core/key';\n\nconst POPOVER_DIST = 5;\n\nexport default class HintPopover {\n constructor(context) {\n this.context = context;\n\n this.ui = $.summernote.ui;\n this.$editable = context.layoutInfo.editable;\n this.options = context.options;\n this.hint = this.options.hint || [];\n this.direction = this.options.hintDirection || 'bottom';\n this.hints = $.isArray(this.hint) ? this.hint : [this.hint];\n\n this.events = {\n 'summernote.keyup': (we, e) => {\n if (!e.isDefaultPrevented()) {\n this.handleKeyup(e);\n }\n },\n 'summernote.keydown': (we, e) => {\n this.handleKeydown(e);\n },\n 'summernote.disable summernote.dialog.shown': () => {\n this.hide();\n }\n };\n }\n\n shouldInitialize() {\n return this.hints.length > 0;\n }\n\n initialize() {\n this.lastWordRange = null;\n this.$popover = this.ui.popover({\n className: 'note-hint-popover',\n hideArrow: true,\n direction: ''\n }).render().appendTo(this.options.container);\n\n this.$popover.hide();\n this.$content = this.$popover.find('.popover-content,.note-popover-content');\n this.$content.on('click', '.note-hint-item', () => {\n this.$content.find('.active').removeClass('active');\n $(this).addClass('active');\n this.replace();\n });\n }\n\n destroy() {\n this.$popover.remove();\n }\n\n selectItem($item) {\n this.$content.find('.active').removeClass('active');\n $item.addClass('active');\n\n this.$content[0].scrollTop = $item[0].offsetTop - (this.$content.innerHeight() / 2);\n }\n\n moveDown() {\n const $current = this.$content.find('.note-hint-item.active');\n const $next = $current.next();\n\n if ($next.length) {\n this.selectItem($next);\n } else {\n let $nextGroup = $current.parent().next();\n\n if (!$nextGroup.length) {\n $nextGroup = this.$content.find('.note-hint-group').first();\n }\n\n this.selectItem($nextGroup.find('.note-hint-item').first());\n }\n }\n\n moveUp() {\n const $current = this.$content.find('.note-hint-item.active');\n const $prev = $current.prev();\n\n if ($prev.length) {\n this.selectItem($prev);\n } else {\n let $prevGroup = $current.parent().prev();\n\n if (!$prevGroup.length) {\n $prevGroup = this.$content.find('.note-hint-group').last();\n }\n\n this.selectItem($prevGroup.find('.note-hint-item').last());\n }\n }\n\n replace() {\n const $item = this.$content.find('.note-hint-item.active');\n\n if ($item.length) {\n const node = this.nodeFromItem($item);\n // XXX: consider to move codes to editor for recording redo/undo.\n this.lastWordRange.insertNode(node);\n range.createFromNode(node).collapse().select();\n\n this.lastWordRange = null;\n this.hide();\n this.context.triggerEvent('change', this.$editable.html(), this.$editable[0]);\n this.context.invoke('editor.focus');\n }\n }\n\n nodeFromItem($item) {\n const hint = this.hints[$item.data('index')];\n const item = $item.data('item');\n let node = hint.content ? hint.content(item) : item;\n if (typeof node === 'string') {\n node = dom.createText(node);\n }\n return node;\n }\n\n createItemTemplates(hintIdx, items) {\n const hint = this.hints[hintIdx];\n return items.map((item, idx) => {\n const $item = $('<div class=\"note-hint-item\"/>');\n $item.append(hint.template ? hint.template(item) : item + '');\n $item.data({\n 'index': hintIdx,\n 'item': item\n });\n return $item;\n });\n }\n\n handleKeydown(e) {\n if (!this.$popover.is(':visible')) {\n return;\n }\n\n if (e.keyCode === key.code.ENTER) {\n e.preventDefault();\n this.replace();\n } else if (e.keyCode === key.code.UP) {\n e.preventDefault();\n this.moveUp();\n } else if (e.keyCode === key.code.DOWN) {\n e.preventDefault();\n this.moveDown();\n }\n }\n\n searchKeyword(index, keyword, callback) {\n const hint = this.hints[index];\n if (hint && hint.match.test(keyword) && hint.search) {\n const matches = hint.match.exec(keyword);\n hint.search(matches[1], callback);\n } else {\n callback();\n }\n }\n\n createGroup(idx, keyword) {\n const $group = $('<div class=\"note-hint-group note-hint-group-' + idx + '\"/>');\n this.searchKeyword(idx, keyword, (items) => {\n items = items || [];\n if (items.length) {\n $group.html(this.createItemTemplates(idx, items));\n this.show();\n }\n });\n\n return $group;\n }\n\n handleKeyup(e) {\n if (!lists.contains([key.code.ENTER, key.code.UP, key.code.DOWN], e.keyCode)) {\n const wordRange = this.context.invoke('editor.createRange').getWordRange();\n const keyword = wordRange.toString();\n if (this.hints.length && keyword) {\n this.$content.empty();\n\n const bnd = func.rect2bnd(lists.last(wordRange.getClientRects()));\n if (bnd) {\n this.$popover.hide();\n this.lastWordRange = wordRange;\n this.hints.forEach((hint, idx) => {\n if (hint.match.test(keyword)) {\n this.createGroup(idx, keyword).appendTo(this.$content);\n }\n });\n // select first .note-hint-item\n this.$content.find('.note-hint-item:first').addClass('active');\n\n // set position for popover after group is created\n if (this.direction === 'top') {\n this.$popover.css({\n left: bnd.left,\n top: bnd.top - this.$popover.outerHeight() - POPOVER_DIST\n });\n } else {\n this.$popover.css({\n left: bnd.left,\n top: bnd.top + bnd.height + POPOVER_DIST\n });\n }\n }\n } else {\n this.hide();\n }\n }\n }\n\n show() {\n this.$popover.show();\n }\n\n hide() {\n this.$popover.hide();\n }\n}\n","import $ from 'jquery';\nimport func from './core/func';\nimport lists from './core/lists';\nimport dom from './core/dom';\n\nexport default class Context {\n /**\n * @param {jQuery} $note\n * @param {Object} options\n */\n constructor($note, options) {\n this.ui = $.summernote.ui;\n this.$note = $note;\n\n this.memos = {};\n this.modules = {};\n this.layoutInfo = {};\n this.options = options;\n\n this.initialize();\n }\n\n /**\n * create layout and initialize modules and other resources\n */\n initialize() {\n this.layoutInfo = this.ui.createLayout(this.$note, this.options);\n this._initialize();\n this.$note.hide();\n return this;\n }\n\n /**\n * destroy modules and other resources and remove layout\n */\n destroy() {\n this._destroy();\n this.$note.removeData('summernote');\n this.ui.removeLayout(this.$note, this.layoutInfo);\n }\n\n /**\n * destory modules and other resources and initialize it again\n */\n reset() {\n const disabled = this.isDisabled();\n this.code(dom.emptyPara);\n this._destroy();\n this._initialize();\n\n if (disabled) {\n this.disable();\n }\n }\n\n _initialize() {\n // add optional buttons\n const buttons = $.extend({}, this.options.buttons);\n Object.keys(buttons).forEach((key) => {\n this.memo('button.' + key, buttons[key]);\n });\n\n const modules = $.extend({}, this.options.modules, $.summernote.plugins || {});\n\n // add and initialize modules\n Object.keys(modules).forEach((key) => {\n this.module(key, modules[key], true);\n });\n\n Object.keys(this.modules).forEach((key) => {\n this.initializeModule(key);\n });\n }\n\n _destroy() {\n // destroy modules with reversed order\n Object.keys(this.modules).reverse().forEach((key) => {\n this.removeModule(key);\n });\n\n Object.keys(this.memos).forEach((key) => {\n this.removeMemo(key);\n });\n // trigger custom onDestroy callback\n this.triggerEvent('destroy', this);\n }\n\n code(html) {\n const isActivated = this.invoke('codeview.isActivated');\n\n if (html === undefined) {\n this.invoke('codeview.sync');\n return isActivated ? this.layoutInfo.codable.val() : this.layoutInfo.editable.html();\n } else {\n if (isActivated) {\n this.layoutInfo.codable.val(html);\n } else {\n this.layoutInfo.editable.html(html);\n }\n this.$note.val(html);\n this.triggerEvent('change', html);\n }\n }\n\n isDisabled() {\n return this.layoutInfo.editable.attr('contenteditable') === 'false';\n }\n\n enable() {\n this.layoutInfo.editable.attr('contenteditable', true);\n this.invoke('toolbar.activate', true);\n this.triggerEvent('disable', false);\n }\n\n disable() {\n // close codeview if codeview is opend\n if (this.invoke('codeview.isActivated')) {\n this.invoke('codeview.deactivate');\n }\n this.layoutInfo.editable.attr('contenteditable', false);\n this.invoke('toolbar.deactivate', true);\n\n this.triggerEvent('disable', true);\n }\n\n triggerEvent() {\n const namespace = lists.head(arguments);\n const args = lists.tail(lists.from(arguments));\n\n const callback = this.options.callbacks[func.namespaceToCamel(namespace, 'on')];\n if (callback) {\n callback.apply(this.$note[0], args);\n }\n this.$note.trigger('summernote.' + namespace, args);\n }\n\n initializeModule(key) {\n const module = this.modules[key];\n module.shouldInitialize = module.shouldInitialize || func.ok;\n if (!module.shouldInitialize()) {\n return;\n }\n\n // initialize module\n if (module.initialize) {\n module.initialize();\n }\n\n // attach events\n if (module.events) {\n dom.attachEvents(this.$note, module.events);\n }\n }\n\n module(key, ModuleClass, withoutIntialize) {\n if (arguments.length === 1) {\n return this.modules[key];\n }\n\n this.modules[key] = new ModuleClass(this);\n\n if (!withoutIntialize) {\n this.initializeModule(key);\n }\n }\n\n removeModule(key) {\n const module = this.modules[key];\n if (module.shouldInitialize()) {\n if (module.events) {\n dom.detachEvents(this.$note, module.events);\n }\n\n if (module.destroy) {\n module.destroy();\n }\n }\n\n delete this.modules[key];\n }\n\n memo(key, obj) {\n if (arguments.length === 1) {\n return this.memos[key];\n }\n this.memos[key] = obj;\n }\n\n removeMemo(key) {\n if (this.memos[key] && this.memos[key].destroy) {\n this.memos[key].destroy();\n }\n\n delete this.memos[key];\n }\n\n /**\n * Some buttons need to change their visual style immediately once they get pressed\n */\n createInvokeHandlerAndUpdateState(namespace, value) {\n return (event) => {\n this.createInvokeHandler(namespace, value)(event);\n this.invoke('buttons.updateCurrentStyle');\n };\n }\n\n createInvokeHandler(namespace, value) {\n return (event) => {\n event.preventDefault();\n const $target = $(event.target);\n this.invoke(namespace, value || $target.closest('[data-value]').data('value'), $target);\n };\n }\n\n invoke() {\n const namespace = lists.head(arguments);\n const args = lists.tail(lists.from(arguments));\n\n const splits = namespace.split('.');\n const hasSeparator = splits.length > 1;\n const moduleName = hasSeparator && lists.head(splits);\n const methodName = hasSeparator ? lists.last(splits) : lists.head(splits);\n\n const module = this.modules[moduleName || 'editor'];\n if (!moduleName && this[methodName]) {\n return this[methodName].apply(this, args);\n } else if (module && module[methodName] && module.shouldInitialize()) {\n return module[methodName].apply(module, args);\n }\n }\n}\n","import $ from 'jquery';\nimport env from './base/core/env';\nimport lists from './base/core/lists';\nimport Context from './base/Context';\n\n$.fn.extend({\n /**\n * Summernote API\n *\n * @param {Object|String}\n * @return {this}\n */\n summernote: function() {\n const type = $.type(lists.head(arguments));\n const isExternalAPICalled = type === 'string';\n const hasInitOptions = type === 'object';\n\n const options = $.extend({}, $.summernote.options, hasInitOptions ? lists.head(arguments) : {});\n\n // Update options\n options.langInfo = $.extend(true, {}, $.summernote.lang['en-US'], $.summernote.lang[options.lang]);\n options.icons = $.extend(true, {}, $.summernote.options.icons, options.icons);\n options.tooltip = options.tooltip === 'auto' ? !env.isSupportTouch : options.tooltip;\n\n this.each((idx, note) => {\n const $note = $(note);\n if (!$note.data('summernote')) {\n const context = new Context($note, options);\n $note.data('summernote', context);\n $note.data('summernote').triggerEvent('init', context.layoutInfo);\n }\n });\n\n const $note = this.first();\n if ($note.length) {\n const context = $note.data('summernote');\n if (isExternalAPICalled) {\n return context.invoke.apply(context, lists.from(arguments));\n } else if (options.focus) {\n context.invoke('editor.focus');\n }\n }\n\n return this;\n }\n});\n","import $ from 'jquery';\nimport ui from './ui';\nimport '../base/summernote-en-US';\nimport Editor from '../base/module/Editor';\nimport Clipboard from '../base/module/Clipboard';\nimport Dropzone from '../base/module/Dropzone';\nimport Codeview from '../base/module/Codeview';\nimport Statusbar from '../base/module/Statusbar';\nimport Fullscreen from '../base/module/Fullscreen';\nimport Handle from '../base/module/Handle';\nimport AutoLink from '../base/module/AutoLink';\nimport AutoSync from '../base/module/AutoSync';\nimport Placeholder from '../base/module/Placeholder';\nimport Buttons from '../base/module/Buttons';\nimport Toolbar from '../base/module/Toolbar';\nimport LinkDialog from '../base/module/LinkDialog';\nimport LinkPopover from '../base/module/LinkPopover';\nimport ImageDialog from '../base/module/ImageDialog';\nimport ImagePopover from '../base/module/ImagePopover';\nimport TablePopover from '../base/module/TablePopover';\nimport VideoDialog from '../base/module/VideoDialog';\nimport HelpDialog from '../base/module/HelpDialog';\nimport AirPopover from '../base/module/AirPopover';\nimport HintPopover from '../base/module/HintPopover';\n\n$.summernote = $.extend($.summernote, {\n version: '@@VERSION@@',\n ui: ui,\n\n plugins: {},\n\n options: {\n modules: {\n 'editor': Editor,\n 'clipboard': Clipboard,\n 'dropzone': Dropzone,\n 'codeview': Codeview,\n 'statusbar': Statusbar,\n 'fullscreen': Fullscreen,\n 'handle': Handle,\n // FIXME: HintPopover must be front of autolink\n // - Script error about range when Enter key is pressed on hint popover\n 'hintPopover': HintPopover,\n 'autoLink': AutoLink,\n 'autoSync': AutoSync,\n 'placeholder': Placeholder,\n 'buttons': Buttons,\n 'toolbar': Toolbar,\n 'linkDialog': LinkDialog,\n 'linkPopover': LinkPopover,\n 'imageDialog': ImageDialog,\n 'imagePopover': ImagePopover,\n 'tablePopover': TablePopover,\n 'videoDialog': VideoDialog,\n 'helpDialog': HelpDialog,\n 'airPopover': AirPopover\n },\n\n buttons: {},\n\n lang: 'en-US',\n\n followingToolbar: true,\n otherStaticBar: '',\n\n // toolbar\n toolbar: [\n ['style', ['style']],\n ['font', ['bold', 'underline', 'clear']],\n ['fontname', ['fontname']],\n ['fontsize', ['fontsize']],\n ['color', ['color']],\n ['para', ['ul', 'ol', 'paragraph']],\n ['table', ['table']],\n ['insert', ['link', 'picture', 'video']],\n ['view', ['fullscreen', 'codeview', 'help']]\n ],\n\n // popover\n popatmouse: true,\n popover: {\n image: [\n ['imagesize', ['imageSize100', 'imageSize50', 'imageSize25']],\n ['float', ['floatLeft', 'floatRight', 'floatNone']],\n ['remove', ['removeMedia']]\n ],\n link: [\n ['link', ['linkDialogShow', 'unlink']]\n ],\n table: [\n ['add', ['addRowDown', 'addRowUp', 'addColLeft', 'addColRight']],\n ['delete', ['deleteRow', 'deleteCol', 'deleteTable']]\n ],\n air: [\n ['color', ['color']],\n ['font', ['bold', 'underline', 'clear']],\n ['para', ['ul', 'paragraph']],\n ['table', ['table']],\n ['insert', ['link', 'picture']]\n ]\n },\n\n // air mode: inline editor\n airMode: false,\n\n width: null,\n height: null,\n\n focus: false,\n tabSize: 4,\n styleWithSpan: true,\n shortcuts: true,\n textareaAutoSync: true,\n hintDirection: 'bottom',\n tooltip: 'auto',\n container: 'body',\n maxTextLength: 0,\n\n styleTags: ['p', 'pre', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'],\n\n fontNames: [\n 'Arial', 'Arial Black', 'Comic Sans MS', 'Courier New',\n 'Helvetica Neue', 'Helvetica', 'Impact', 'Lucida Grande',\n 'Tahoma', 'Times New Roman', 'Verdana'\n ],\n\n fontSizes: ['8', '9', '10', '11', '12', '14', '18', '24', '36'],\n\n // pallete colors(n x n)\n colors: [\n ['#000000', '#424242', '#636363', '#9C9C94', '#CEC6CE', '#EFEFEF', '#F7F7F7', '#FFFFFF'],\n ['#FF0000', '#FF9C00', '#FFFF00', '#00FF00', '#00FFFF', '#0000FF', '#9C00FF', '#FF00FF'],\n ['#F7C6CE', '#FFE7CE', '#FFEFC6', '#D6EFD6', '#CEDEE7', '#CEE7F7', '#D6D6E7', '#E7D6DE'],\n ['#E79C9C', '#FFC69C', '#FFE79C', '#B5D6A5', '#A5C6CE', '#9CC6EF', '#B5A5D6', '#D6A5BD'],\n ['#E76363', '#F7AD6B', '#FFD663', '#94BD7B', '#73A5AD', '#6BADDE', '#8C7BC6', '#C67BA5'],\n ['#CE0000', '#E79439', '#EFC631', '#6BA54A', '#4A7B8C', '#3984C6', '#634AA5', '#A54A7B'],\n ['#9C0000', '#B56308', '#BD9400', '#397B21', '#104A5A', '#085294', '#311873', '#731842'],\n ['#630000', '#7B3900', '#846300', '#295218', '#083139', '#003163', '#21104A', '#4A1031']\n ],\n\n lineHeights: ['1.0', '1.2', '1.4', '1.5', '1.6', '1.8', '2.0', '3.0'],\n\n tableClassName: 'table table-bordered',\n\n insertTableMaxSize: {\n col: 10,\n row: 10\n },\n\n dialogsInBody: false,\n dialogsFade: false,\n\n maximumImageFileSize: null,\n\n callbacks: {\n onInit: null,\n onFocus: null,\n onBlur: null,\n onBlurCodeview: null,\n onEnter: null,\n onKeyup: null,\n onKeydown: null,\n onSubmit: null,\n onImageUpload: null,\n onImageUploadError: null\n },\n\n codemirror: {\n mode: 'text/html',\n htmlMode: true,\n lineNumbers: true\n },\n\n keyMap: {\n pc: {\n 'ENTER': 'insertParagraph',\n 'CTRL+Z': 'undo',\n 'CTRL+Y': 'redo',\n 'TAB': 'tab',\n 'SHIFT+TAB': 'untab',\n 'CTRL+B': 'bold',\n 'CTRL+I': 'italic',\n 'CTRL+U': 'underline',\n 'CTRL+SHIFT+S': 'strikethrough',\n 'CTRL+BACKSLASH': 'removeFormat',\n 'CTRL+SHIFT+L': 'justifyLeft',\n 'CTRL+SHIFT+E': 'justifyCenter',\n 'CTRL+SHIFT+R': 'justifyRight',\n 'CTRL+SHIFT+J': 'justifyFull',\n 'CTRL+SHIFT+NUM7': 'insertUnorderedList',\n 'CTRL+SHIFT+NUM8': 'insertOrderedList',\n 'CTRL+LEFTBRACKET': 'outdent',\n 'CTRL+RIGHTBRACKET': 'indent',\n 'CTRL+NUM0': 'formatPara',\n 'CTRL+NUM1': 'formatH1',\n 'CTRL+NUM2': 'formatH2',\n 'CTRL+NUM3': 'formatH3',\n 'CTRL+NUM4': 'formatH4',\n 'CTRL+NUM5': 'formatH5',\n 'CTRL+NUM6': 'formatH6',\n 'CTRL+ENTER': 'insertHorizontalRule',\n 'CTRL+K': 'linkDialog.show'\n },\n\n mac: {\n 'ENTER': 'insertParagraph',\n 'CMD+Z': 'undo',\n 'CMD+SHIFT+Z': 'redo',\n 'TAB': 'tab',\n 'SHIFT+TAB': 'untab',\n 'CMD+B': 'bold',\n 'CMD+I': 'italic',\n 'CMD+U': 'underline',\n 'CMD+SHIFT+S': 'strikethrough',\n 'CMD+BACKSLASH': 'removeFormat',\n 'CMD+SHIFT+L': 'justifyLeft',\n 'CMD+SHIFT+E': 'justifyCenter',\n 'CMD+SHIFT+R': 'justifyRight',\n 'CMD+SHIFT+J': 'justifyFull',\n 'CMD+SHIFT+NUM7': 'insertUnorderedList',\n 'CMD+SHIFT+NUM8': 'insertOrderedList',\n 'CMD+LEFTBRACKET': 'outdent',\n 'CMD+RIGHTBRACKET': 'indent',\n 'CMD+NUM0': 'formatPara',\n 'CMD+NUM1': 'formatH1',\n 'CMD+NUM2': 'formatH2',\n 'CMD+NUM3': 'formatH3',\n 'CMD+NUM4': 'formatH4',\n 'CMD+NUM5': 'formatH5',\n 'CMD+NUM6': 'formatH6',\n 'CMD+ENTER': 'insertHorizontalRule',\n 'CMD+K': 'linkDialog.show'\n }\n },\n icons: {\n 'align': 'note-icon-align',\n 'alignCenter': 'note-icon-align-center',\n 'alignJustify': 'note-icon-align-justify',\n 'alignLeft': 'note-icon-align-left',\n 'alignRight': 'note-icon-align-right',\n 'rowBelow': 'note-icon-row-below',\n 'colBefore': 'note-icon-col-before',\n 'colAfter': 'note-icon-col-after',\n 'rowAbove': 'note-icon-row-above',\n 'rowRemove': 'note-icon-row-remove',\n 'colRemove': 'note-icon-col-remove',\n 'indent': 'note-icon-align-indent',\n 'outdent': 'note-icon-align-outdent',\n 'arrowsAlt': 'note-icon-arrows-alt',\n 'bold': 'note-icon-bold',\n 'caret': 'note-icon-caret',\n 'circle': 'note-icon-circle',\n 'close': 'note-icon-close',\n 'code': 'note-icon-code',\n 'eraser': 'note-icon-eraser',\n 'font': 'note-icon-font',\n 'frame': 'note-icon-frame',\n 'italic': 'note-icon-italic',\n 'link': 'note-icon-link',\n 'unlink': 'note-icon-chain-broken',\n 'magic': 'note-icon-magic',\n 'menuCheck': 'note-icon-menu-check',\n 'minus': 'note-icon-minus',\n 'orderedlist': 'note-icon-orderedlist',\n 'pencil': 'note-icon-pencil',\n 'picture': 'note-icon-picture',\n 'question': 'note-icon-question',\n 'redo': 'note-icon-redo',\n 'square': 'note-icon-square',\n 'strikethrough': 'note-icon-strikethrough',\n 'subscript': 'note-icon-subscript',\n 'superscript': 'note-icon-superscript',\n 'table': 'note-icon-table',\n 'textHeight': 'note-icon-text-height',\n 'trash': 'note-icon-trash',\n 'underline': 'note-icon-underline',\n 'undo': 'note-icon-undo',\n 'unorderedlist': 'note-icon-unorderedlist',\n 'video': 'note-icon-video'\n }\n }\n});\n\nimport '../summernote'; // eslint-disable-line\n"],"names":["$","isEmpty","Codeview"],"mappings":";;;;;;;;;;;;;;;;;AAEA;IACE,kBAAY,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;KAC1B;IAED,yBAAM,GAAN,UAAO,OAAO;QACZ,IAAM,KAAK,GAAGA,GAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAE7B,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;YACzC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CA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