Visman 2 лет назад
Родитель
Сommit
ca27ea6305

+ 0 - 1269
public/js/sc/formats/xhtml.js

@@ -1,1269 +0,0 @@
-/**
- * SCEditor XHTML Plugin
- * http://www.sceditor.com/
- *
- * Copyright (C) 2017, Sam Clarke (samclarke.com)
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- *
- * @author Sam Clarke
- */
-(function (sceditor) {
-	'use strict';
-
-	var dom = sceditor.dom;
-	var utils = sceditor.utils;
-
-	var css = dom.css;
-	var attr = dom.attr;
-	var is = dom.is;
-	var removeAttr = dom.removeAttr;
-	var convertElement = dom.convertElement;
-	var extend = utils.extend;
-	var each = utils.each;
-	var isEmptyObject = utils.isEmptyObject;
-
-	var getEditorCommand = sceditor.command.get;
-
-	var defaultCommandsOverrides = {
-		bold: {
-			txtExec: ['<strong>', '</strong>']
-		},
-		italic: {
-			txtExec: ['<em>', '</em>']
-		},
-		underline: {
-			txtExec: ['<span style="text-decoration:underline;">', '</span>']
-		},
-		strike: {
-			txtExec: ['<span style="text-decoration:line-through;">', '</span>']
-		},
-		subscript: {
-			txtExec: ['<sub>', '</sub>']
-		},
-		superscript: {
-			txtExec: ['<sup>', '</sup>']
-		},
-		left: {
-			txtExec: ['<div style="text-align:left;">', '</div>']
-		},
-		center: {
-			txtExec: ['<div style="text-align:center;">', '</div>']
-		},
-		right: {
-			txtExec: ['<div style="text-align:right;">', '</div>']
-		},
-		justify: {
-			txtExec: ['<div style="text-align:justify;">', '</div>']
-		},
-		font: {
-			txtExec: function (caller) {
-				var editor = this;
-
-				getEditorCommand('font')._dropDown(
-					editor,
-					caller,
-					function (font) {
-						editor.insertText('<span style="font-family:' +
-							font + ';">', '</span>');
-					}
-				);
-			}
-		},
-		size: {
-			txtExec: function (caller) {
-				var editor = this;
-
-				getEditorCommand('size')._dropDown(
-					editor,
-					caller,
-					function (size) {
-						editor.insertText('<span style="font-size:' +
-							size + ';">', '</span>');
-					}
-				);
-			}
-		},
-		color: {
-			txtExec: function (caller) {
-				var editor = this;
-
-				getEditorCommand('color')._dropDown(
-					editor,
-					caller,
-					function (color) {
-						editor.insertText('<span style="color:' +
-							color + ';">', '</span>');
-					}
-				);
-			}
-		},
-		bulletlist: {
-			txtExec: ['<ul><li>', '</li></ul>']
-		},
-		orderedlist: {
-			txtExec: ['<ol><li>', '</li></ol>']
-		},
-		table: {
-			txtExec: ['<table><tr><td>', '</td></tr></table>']
-		},
-		horizontalrule: {
-			txtExec: ['<hr />']
-		},
-		code: {
-			txtExec: ['<code>', '</code>']
-		},
-		image: {
-			txtExec: function (caller, selected) {
-				var	editor  = this;
-
-				getEditorCommand('image')._dropDown(
-					editor,
-					caller,
-					selected,
-					function (url, width, height) {
-						var attrs  = '';
-
-						if (width) {
-							attrs += ' width="' + width + '"';
-						}
-
-						if (height) {
-							attrs += ' height="' + height + '"';
-						}
-
-						editor.insertText(
-							'<img' + attrs + ' src="' + url + '" />'
-						);
-					}
-				);
-			}
-		},
-		email: {
-			txtExec: function (caller, selected) {
-				var	editor  = this;
-
-				getEditorCommand('email')._dropDown(
-					editor,
-					caller,
-					function (url, text) {
-						editor.insertText(
-							'<a href="mailto:' + url + '">' +
-								(text || selected || url) +
-							'</a>'
-						);
-					}
-				);
-			}
-		},
-		link: {
-			txtExec: function (caller, selected) {
-				var	editor  = this;
-
-				getEditorCommand('link')._dropDown(
-					editor,
-					caller,
-					function (url, text) {
-						editor.insertText(
-							'<a href="' + url + '">' +
-								(text || selected || url) +
-							'</a>'
-						);
-					}
-				);
-			}
-		},
-		quote: {
-			txtExec: ['<blockquote>', '</blockquote>']
-		},
-		youtube: {
-			txtExec: function (caller) {
-				var editor = this;
-
-				getEditorCommand('youtube')._dropDown(
-					editor,
-					caller,
-					function (id, time) {
-						editor.insertText(
-							'<iframe width="560" height="315" ' +
-							'src="https://www.youtube.com/embed/{id}?' +
-							'wmode=opaque&start=' + time + '" ' +
-							'data-youtube-id="' + id + '" ' +
-							'frameborder="0" allowfullscreen></iframe>'
-						);
-					}
-				);
-			}
-		},
-		rtl: {
-			txtExec: ['<div stlye="direction:rtl;">', '</div>']
-		},
-		ltr: {
-			txtExec: ['<div stlye="direction:ltr;">', '</div>']
-		}
-	};
-
-	/**
-	 * XHTMLSerializer part of the XHTML plugin.
-	 *
-	 * @class XHTMLSerializer
-	 * @name jQuery.sceditor.XHTMLSerializer
-	 * @since v1.4.1
-	 */
-	sceditor.XHTMLSerializer = function () {
-		var base = this;
-
-		var opts = {
-			indentStr: '\t'
-		};
-
-		/**
-		 * Array containing the output, used as it's faster
-		 * than string concatenation in slow browsers.
-		 * @type {Array}
-		 * @private
-		 */
-		var outputStringBuilder = [];
-
-		/**
-		 * Current indention level
-		 * @type {number}
-		 * @private
-		 */
-		var currentIndent = 0;
-
-		// TODO: use escape.entities
-		/**
-		 * Escapes XHTML entities
-		 *
-		 * @param  {string} str
-		 * @return {string}
-		 * @private
-		 */
-		function escapeEntities(str) {
-			var entities = {
-				'&': '&amp;',
-				'<': '&lt;',
-				'>': '&gt;',
-				'"': '&quot;',
-				'\xa0': '&nbsp;'
-			};
-
-			return !str ? '' : str.replace(/[&<>"\xa0]/g, function (entity) {
-				return entities[entity] || entity;
-			});
-		};
-
-		/**
-		 * Replace spaces including newlines with a single
-		 * space except for non-breaking spaces
-		 *
-		 * @param  {string} str
-		 * @return {string}
-		 * @private
-		 */
-		function trim(str) {
-			return str.replace(/[^\S\u00A0]+/g, ' ');
-		};
-
-		/**
-		 * Serializes a node to XHTML
-		 *
-		 * @param  {Node} node            Node to serialize
-		 * @param  {boolean} onlyChildren If to only serialize the nodes
-		 *                                children and not the node
-		 *                                itself
-		 * @return {string}               The serialized node
-		 * @name serialize
-		 * @memberOf jQuery.sceditor.XHTMLSerializer.prototype
-		 * @since v1.4.1
-		 */
-		base.serialize = function (node, onlyChildren) {
-			outputStringBuilder = [];
-
-			if (onlyChildren) {
-				node = node.firstChild;
-
-				while (node) {
-					serializeNode(node);
-					node = node.nextSibling;
-				}
-			} else {
-				serializeNode(node);
-			}
-
-			return outputStringBuilder.join('');
-		};
-
-		/**
-		 * Serializes a node to the outputStringBuilder
-		 *
-		 * @param  {Node} node
-		 * @return {void}
-		 * @private
-		 */
-		function serializeNode(node, parentIsPre) {
-			switch (node.nodeType) {
-				case 1: // element
-					handleElement(node, parentIsPre);
-					break;
-
-				case 3: // text
-					handleText(node, parentIsPre);
-					break;
-
-				case 4: // cdata section
-					handleCdata(node);
-					break;
-
-				case 8: // comment
-					handleComment(node);
-					break;
-
-				case 9: // document
-				case 11: // document fragment
-					handleDoc(node);
-					break;
-
-				// Ignored types
-				case 2: // attribute
-				case 5: // entity ref
-				case 6: // entity
-				case 7: // processing instruction
-				case 10: // document type
-				case 12: // notation
-					break;
-			}
-		};
-
-		/**
-		 * Handles doc node
-		 * @param  {Node} node
-		 * @return {void}
-		 * @private
-		 */
-		function handleDoc(node) {
-			var	child = node.firstChild;
-
-			while (child) {
-				serializeNode(child);
-				child = child.nextSibling;
-			}
-		};
-
-		/**
-		 * Handles element nodes
-		 * @param  {Node} node
-		 * @return {void}
-		 * @private
-		 */
-		function handleElement(node, parentIsPre) {
-			var	child, attr, attrValue,
-				tagName     = node.nodeName.toLowerCase(),
-				isIframe    = tagName === 'iframe',
-				attrIdx     = node.attributes.length,
-				firstChild  = node.firstChild,
-				// pre || pre-wrap with any vendor prefix
-				isPre       = parentIsPre ||
-					/pre(?:\-wrap)?$/i.test(css(node, 'whiteSpace')),
-				selfClosing = !node.firstChild && !dom.canHaveChildren(node) &&
-					!isIframe;
-
-			if (is(node, '.sceditor-ignore')) {
-				return;
-			}
-
-			output('<' + tagName, !parentIsPre && canIndent(node));
-			while (attrIdx--) {
-				attr = node.attributes[attrIdx];
-
-				attrValue = attr.value;
-
-				output(' ' + attr.name.toLowerCase() + '="' +
-					escapeEntities(attrValue) + '"', false);
-			}
-			output(selfClosing ? ' />' : '>', false);
-
-			if (!isIframe) {
-				child = firstChild;
-			}
-
-			while (child) {
-				currentIndent++;
-
-				serializeNode(child, isPre);
-				child = child.nextSibling;
-
-				currentIndent--;
-			}
-
-			if (!selfClosing) {
-				output(
-					'</' + tagName + '>',
-					!isPre && !isIframe && canIndent(node) &&
-						firstChild && canIndent(firstChild)
-				);
-			}
-		};
-
-		/**
-		 * Handles CDATA nodes
-		 * @param  {Node} node
-		 * @return {void}
-		 * @private
-		 */
-		function handleCdata(node) {
-			output('<![CDATA[' + escapeEntities(node.nodeValue) + ']]>');
-		};
-
-		/**
-		 * Handles comment nodes
-		 * @param  {Node} node
-		 * @return {void}
-		 * @private
-		 */
-		function handleComment(node) {
-			output('<!-- ' + escapeEntities(node.nodeValue) + ' -->');
-		};
-
-		/**
-		 * Handles text nodes
-		 * @param  {Node} node
-		 * @return {void}
-		 * @private
-		 */
-		function handleText(node, parentIsPre) {
-			var text = node.nodeValue;
-
-			if (!parentIsPre) {
-				text = trim(text);
-			}
-
-			if (text) {
-				output(escapeEntities(text), !parentIsPre && canIndent(node));
-			}
-		};
-
-		/**
-		 * Adds a string to the outputStringBuilder.
-		 *
-		 * The string will be indented unless indent is set to boolean false.
-		 * @param  {string} str
-		 * @param  {boolean} indent
-		 * @return {void}
-		 * @private
-		 */
-		function output(str, indent) {
-			var i = currentIndent;
-
-			if (indent !== false) {
-				// Don't add a new line if it's the first element
-				if (outputStringBuilder.length) {
-					outputStringBuilder.push('\n');
-				}
-
-				while (i--) {
-					outputStringBuilder.push(opts.indentStr);
-				}
-			}
-
-			outputStringBuilder.push(str);
-		};
-
-		/**
-		 * Checks if should indent the node or not
-		 * @param  {Node} node
-		 * @return {boolean}
-		 * @private
-		 */
-		function canIndent(node) {
-			var prev = node.previousSibling;
-
-			if (node.nodeType !== 1 && prev) {
-				return !dom.isInline(prev);
-			}
-
-			// first child of a block element
-			if (!prev && !dom.isInline(node.parentNode)) {
-				return true;
-			}
-
-			return !dom.isInline(node);
-		};
-	};
-
-	/**
-	 * SCEditor XHTML plugin
-	 * @class xhtml
-	 * @name jQuery.sceditor.plugins.xhtml
-	 * @since v1.4.1
-	 */
-	function xhtmlFormat() {
-		var base = this;
-
-		/**
-		 * Tag converters cache
-		 * @type {Object}
-		 * @private
-		 */
-		var tagConvertersCache = {};
-
-		/**
-		 * Attributes filter cache
-		 * @type {Object}
-		 * @private
-		 */
-		var attrsCache = {};
-
-		/**
-		 * Init
-		 * @return {void}
-		 */
-		base.init = function () {
-			if (!isEmptyObject(xhtmlFormat.converters || {})) {
-				each(
-					xhtmlFormat.converters,
-					function (idx, converter) {
-						each(converter.tags, function (tagname) {
-							if (!tagConvertersCache[tagname]) {
-								tagConvertersCache[tagname] = [];
-							}
-
-							tagConvertersCache[tagname].push(converter);
-						});
-					}
-				);
-			}
-
-			this.commands = extend(true,
-				{}, defaultCommandsOverrides, this.commands);
-		};
-
-		/**
-		 * Converts the WYSIWYG content to XHTML
-		 *
-		 * @param  {boolean} isFragment
-		 * @param  {string} html
-		 * @param  {Document} context
-		 * @param  {HTMLElement} [parent]
-		 * @return {string}
-		 * @memberOf jQuery.sceditor.plugins.xhtml.prototype
-		 */
-		function toSource(isFragment, html, context) {
-			var xhtml,
-				container = context.createElement('div');
-			container.innerHTML = html;
-
-			css(container, 'visibility', 'hidden');
-			context.body.appendChild(container);
-
-			convertTags(container);
-			removeTags(container);
-			removeAttribs(container);
-
-			if (!isFragment) {
-				wrapInlines(container);
-			}
-
-			xhtml = (new sceditor.XHTMLSerializer()).serialize(container, true);
-
-			context.body.removeChild(container);
-
-			return xhtml;
-		};
-
-		base.toSource = toSource.bind(null, false);
-
-		base.fragmentToSource = toSource.bind(null, true);;
-
-		/**
-		 * Runs all converters for the specified tagName
-		 * against the DOM node.
-		 * @param  {string} tagName
-		 * @return {Node} node
-		 * @private
-		 */
-		function convertNode(tagName, node) {
-			if (!tagConvertersCache[tagName]) {
-				return;
-			}
-
-			tagConvertersCache[tagName].forEach(function (converter) {
-				if (converter.tags[tagName]) {
-					each(converter.tags[tagName], function (attr, values) {
-						if (!node.getAttributeNode) {
-							return;
-						}
-
-						attr = node.getAttributeNode(attr);
-
-						if (!attr || values && values.indexOf(attr.value) < 0) {
-							return;
-						}
-
-						converter.conv.call(base, node);
-					});
-				} else if (converter.conv) {
-					converter.conv.call(base, node);
-				}
-			});
-		};
-
-		/**
-		 * Converts any tags/attributes to their XHTML equivalents
-		 * @param  {Node} node
-		 * @return {void}
-		 * @private
-		 */
-		function convertTags(node) {
-			dom.traverse(node, function (node) {
-				var	tagName = node.nodeName.toLowerCase();
-
-				convertNode('*', node);
-				convertNode(tagName, node);
-			}, true);
-		};
-
-		/**
-		 * Tests if a node is empty and can be removed.
-		 *
-		 * @param  {Node} node
-		 * @return {boolean}
-		 * @private
-		 */
-		function isEmpty(node, excludeBr) {
-			var	rect,
-				childNodes     = node.childNodes,
-				tagName        = node.nodeName.toLowerCase(),
-				nodeValue      = node.nodeValue,
-				childrenLength = childNodes.length,
-				allowedEmpty   = xhtmlFormat.allowedEmptyTags || [];
-
-			if (excludeBr && tagName === 'br') {
-				return true;
-			}
-
-			if (is(node, '.sceditor-ignore')) {
-				return true;
-			}
-
-			if (allowedEmpty.indexOf(tagName) > -1 || tagName === 'td' ||
-				!dom.canHaveChildren(node)) {
-
-				return false;
-			}
-
-			// \S|\u00A0 = any non space char
-			if (nodeValue && /\S|\u00A0/.test(nodeValue)) {
-				return false;
-			}
-
-			while (childrenLength--) {
-				if (!isEmpty(childNodes[childrenLength],
-					excludeBr && !node.previousSibling && !node.nextSibling)) {
-					return false;
-				}
-			}
-
-			// Treat tags with a width and height from CSS as not empty
-			if (node.getBoundingClientRect &&
-				(node.className || node.hasAttributes('style'))) {
-				rect = node.getBoundingClientRect();
-				return !rect.width || !rect.height;
-			}
-
-			return true;
-		};
-
-		/**
-		 * Removes any tags that are not white listed or if no
-		 * tags are white listed it will remove any tags that
-		 * are black listed.
-		 *
-		 * @param  {Node} rootNode
-		 * @return {void}
-		 * @private
-		 */
-		function removeTags(rootNode) {
-			dom.traverse(rootNode, function (node) {
-				var	remove,
-					tagName         = node.nodeName.toLowerCase(),
-					parentNode      = node.parentNode,
-					nodeType        = node.nodeType,
-					isBlock         = !dom.isInline(node),
-					previousSibling = node.previousSibling,
-					nextSibling     = node.nextSibling,
-					isTopLevel      = parentNode === rootNode,
-					noSiblings      = !previousSibling && !nextSibling,
-					empty           = tagName !== 'iframe' && isEmpty(node,
-						isTopLevel && noSiblings && tagName !== 'br'),
-					document        = node.ownerDocument,
-					allowedTags     = xhtmlFormat.allowedTags,
-					firstChild   	= node.firstChild,
-					disallowedTags  = xhtmlFormat.disallowedTags;
-
-				// 3 = text node
-				if (nodeType === 3) {
-					return;
-				}
-
-				if (nodeType === 4) {
-					tagName = '!cdata';
-				} else if (tagName === '!' || nodeType === 8) {
-					tagName = '!comment';
-				}
-
-				if (nodeType === 1) {
-					// skip empty nlf elements (new lines automatically
-					// added after block level elements like quotes)
-					if (is(node, '.sceditor-nlf')) {
-						if (!firstChild || (node.childNodes.length === 1 &&
-							/br/i.test(firstChild.nodeName))) {
-							// Mark as empty,it will be removed by the next code
-							empty = true;
-						} else {
-							node.classList.remove('sceditor-nlf');
-
-							if (!node.className) {
-								removeAttr(node, 'class');
-							}
-						}
-					}
-				}
-
-				if (empty) {
-					remove = true;
-				// 3 is text node which do not get filtered
-				} else if (allowedTags && allowedTags.length) {
-					remove = (allowedTags.indexOf(tagName) < 0);
-				} else if (disallowedTags && disallowedTags.length) {
-					remove = (disallowedTags.indexOf(tagName) > -1);
-				}
-
-				if (remove) {
-					if (!empty) {
-						if (isBlock && previousSibling &&
-							dom.isInline(previousSibling)) {
-							parentNode.insertBefore(
-								document.createTextNode(' '), node);
-						}
-
-						// Insert all the childen after node
-						while (node.firstChild) {
-							parentNode.insertBefore(node.firstChild,
-								nextSibling);
-						}
-
-						if (isBlock && nextSibling &&
-							dom.isInline(nextSibling)) {
-							parentNode.insertBefore(
-								document.createTextNode(' '), nextSibling);
-						}
-					}
-
-					parentNode.removeChild(node);
-				}
-			}, true);
-		};
-
-		/**
-		 * Merges two sets of attribute filters into one
-		 *
-		 * @param  {Object} filtersA
-		 * @param  {Object} filtersB
-		 * @return {Object}
-		 * @private
-		 */
-		function mergeAttribsFilters(filtersA, filtersB) {
-			var ret = {};
-
-			if (filtersA) {
-				ret = extend({}, ret, filtersA);
-			}
-
-			if (!filtersB) {
-				return ret;
-			}
-
-			each(filtersB, function (attrName, values) {
-				if (Array.isArray(values)) {
-					ret[attrName] = (ret[attrName] || []).concat(values);
-				} else if (!ret[attrName]) {
-					ret[attrName] = null;
-				}
-			});
-
-			return ret;
-		};
-
-		/**
-		 * Wraps adjacent inline child nodes of root
-		 * in paragraphs.
-		 *
-		 * @param {Node} root
-		 * @private
-		 */
-		function wrapInlines(root) {
-			// Strip empty text nodes so they don't get wrapped.
-			dom.removeWhiteSpace(root);
-
-			var wrapper;
-			var node = root.firstChild;
-			var next;
-			while (node) {
-				next = node.nextSibling;
-
-				if (dom.isInline(node) && !is(node, '.sceditor-ignore')) {
-					if (!wrapper) {
-						wrapper = root.ownerDocument.createElement('p');
-						node.parentNode.insertBefore(wrapper, node);
-					}
-
-					wrapper.appendChild(node);
-				} else {
-					wrapper = null;
-				}
-
-				node = next;
-			}
-		};
-
-		/**
-		 * Removes any attributes that are not white listed or
-		 * if no attributes are white listed it will remove
-		 * any attributes that are black listed.
-		 * @param  {Node} node
-		 * @return {void}
-		 * @private
-		 */
-		function removeAttribs(node) {
-			var	tagName, attr, attrName, attrsLength, validValues, remove,
-				allowedAttribs    = xhtmlFormat.allowedAttribs,
-				isAllowed         = allowedAttribs &&
-					!isEmptyObject(allowedAttribs),
-				disallowedAttribs = xhtmlFormat.disallowedAttribs,
-				isDisallowed      = disallowedAttribs &&
-					!isEmptyObject(disallowedAttribs);
-
-			attrsCache = {};
-
-			dom.traverse(node, function (node) {
-				if (!node.attributes) {
-					return;
-				}
-
-				tagName     = node.nodeName.toLowerCase();
-				attrsLength = node.attributes.length;
-
-				if (attrsLength) {
-					if (!attrsCache[tagName]) {
-						if (isAllowed) {
-							attrsCache[tagName] = mergeAttribsFilters(
-								allowedAttribs['*'],
-								allowedAttribs[tagName]
-							);
-						} else {
-							attrsCache[tagName] = mergeAttribsFilters(
-								disallowedAttribs['*'],
-								disallowedAttribs[tagName]
-							);
-						}
-					}
-
-					while (attrsLength--) {
-						attr        = node.attributes[attrsLength];
-						attrName    = attr.name;
-						validValues = attrsCache[tagName][attrName];
-						remove      = false;
-
-						if (isAllowed) {
-							remove = validValues !== null &&
-								(!Array.isArray(validValues) ||
-									validValues.indexOf(attr.value) < 0);
-						} else if (isDisallowed) {
-							remove = validValues === null ||
-								(Array.isArray(validValues) &&
-									validValues.indexOf(attr.value) > -1);
-						}
-
-						if (remove) {
-							node.removeAttribute(attrName);
-						}
-					}
-				}
-			});
-		};
-	};
-
-	/**
-	 * Tag conveters, a converter is applied to all
-	 * tags that match the criteria.
-	 * @type {Array}
-	 * @name jQuery.sceditor.plugins.xhtml.converters
-	 * @since v1.4.1
-	 */
-	xhtmlFormat.converters = [
-		{
-			tags: {
-				'*': {
-					width: null
-				}
-			},
-			conv: function (node) {
-				css(node, 'width', attr(node, 'width'));
-				removeAttr(node, 'width');
-			}
-		},
-		{
-			tags: {
-				'*': {
-					height: null
-				}
-			},
-			conv: function (node) {
-				css(node, 'height', attr(node, 'height'));
-				removeAttr(node, 'height');
-			}
-		},
-		{
-			tags: {
-				'li': {
-					value: null
-				}
-			},
-			conv: function (node) {
-				removeAttr(node, 'value');
-			}
-		},
-		{
-			tags: {
-				'*': {
-					text: null
-				}
-			},
-			conv: function (node) {
-				css(node, 'color', attr(node, 'text'));
-				removeAttr(node, 'text');
-			}
-		},
-		{
-			tags: {
-				'*': {
-					color: null
-				}
-			},
-			conv: function (node) {
-				css(node, 'color', attr(node, 'color'));
-				removeAttr(node, 'color');
-			}
-		},
-		{
-			tags: {
-				'*': {
-					face: null
-				}
-			},
-			conv: function (node) {
-				css(node, 'fontFamily', attr(node, 'face'));
-				removeAttr(node, 'face');
-			}
-		},
-		{
-			tags: {
-				'*': {
-					align: null
-				}
-			},
-			conv: function (node) {
-				css(node, 'textAlign', attr(node, 'align'));
-				removeAttr(node, 'align');
-			}
-		},
-		{
-			tags: {
-				'*': {
-					border: null
-				}
-			},
-			conv: function (node) {
-				css(node, 'borderWidth', attr(node, 'border'));
-				removeAttr(node, 'border');
-			}
-		},
-		{
-			tags: {
-				applet: {
-					name: null
-				},
-				img: {
-					name: null
-				},
-				layer: {
-					name: null
-				},
-				map: {
-					name: null
-				},
-				object: {
-					name: null
-				},
-				param: {
-					name: null
-				}
-			},
-			conv: function (node) {
-				if (!attr(node, 'id')) {
-					attr(node, 'id', attr(node, 'name'));
-				}
-
-				removeAttr(node, 'name');
-			}
-		},
-		{
-			tags: {
-				'*': {
-					vspace: null
-				}
-			},
-			conv: function (node) {
-				css(node, 'marginTop', attr(node, 'vspace') - 0);
-				css(node, 'marginBottom', attr(node, 'vspace') - 0);
-				removeAttr(node, 'vspace');
-			}
-		},
-		{
-			tags: {
-				'*': {
-					hspace: null
-				}
-			},
-			conv: function (node) {
-				css(node, 'marginLeft', attr(node, 'hspace') - 0);
-				css(node, 'marginRight', attr(node, 'hspace') - 0);
-				removeAttr(node, 'hspace');
-			}
-		},
-		{
-			tags: {
-				'hr': {
-					noshade: null
-				}
-			},
-			conv: function (node) {
-				css(node, 'borderStyle', 'solid');
-				removeAttr(node, 'noshade');
-			}
-		},
-		{
-			tags: {
-				'*': {
-					nowrap: null
-				}
-			},
-			conv: function (node) {
-				css(node, 'whiteSpace', 'nowrap');
-				removeAttr(node, 'nowrap');
-			}
-		},
-		{
-			tags: {
-				big: null
-			},
-			conv: function (node) {
-				css(convertElement(node, 'span'), 'fontSize', 'larger');
-			}
-		},
-		{
-			tags: {
-				small: null
-			},
-			conv: function (node) {
-				css(convertElement(node, 'span'), 'fontSize', 'smaller');
-			}
-		},
-		{
-			tags: {
-				b: null
-			},
-			conv: function (node) {
-				convertElement(node, 'strong');
-			}
-		},
-		{
-			tags: {
-				u: null
-			},
-			conv: function (node) {
-				css(convertElement(node, 'span'), 'textDecoration',
-					'underline');
-			}
-		},
-		{
-			tags: {
-				s: null,
-				strike: null
-			},
-			conv: function (node) {
-				css(convertElement(node, 'span'), 'textDecoration',
-					'line-through');
-			}
-		},
-		{
-			tags: {
-				dir: null
-			},
-			conv: function (node) {
-				convertElement(node, 'ul');
-			}
-		},
-		{
-			tags: {
-				center: null
-			},
-			conv: function (node) {
-				css(convertElement(node, 'div'), 'textAlign', 'center');
-			}
-		},
-		{
-			tags: {
-				font: {
-					size: null
-				}
-			},
-			conv: function (node) {
-				css(node, 'fontSize', css(node, 'fontSize'));
-				removeAttr(node, 'size');
-			}
-		},
-		{
-			tags: {
-				font: null
-			},
-			conv: function (node) {
-				// All it's attributes will be converted
-				// by the attribute converters
-				convertElement(node, 'span');
-			}
-		},
-		{
-			tags: {
-				'*': {
-					type: ['_moz']
-				}
-			},
-			conv: function (node) {
-				removeAttr(node, 'type');
-			}
-		},
-		{
-			tags: {
-				'*': {
-					'_moz_dirty': null
-				}
-			},
-			conv: function (node) {
-				removeAttr(node, '_moz_dirty');
-			}
-		},
-		{
-			tags: {
-				'*': {
-					'_moz_editor_bogus_node': null
-				}
-			},
-			conv: function (node) {
-				node.parentNode.removeChild(node);
-			}
-		},
-		{
-			tags: {
-				'*': {
-					'data-sce-target': null
-				}
-			},
-			conv: function (node) {
-				var rel = attr(node, 'rel') || '';
-				var target = attr(node, 'data-sce-target');
-
-				// Only allow the value _blank and only on links
-				if (target === '_blank' && is(node, 'a')) {
-					if (!/(^|\s)noopener(\s|$)/.test(rel)) {
-						attr(node, 'rel', 'noopener' + (rel ? ' ' + rel : ''));
-					}
-
-					attr(node, 'target', target);
-				}
-
-
-				removeAttr(node, 'data-sce-target');
-			}
-		},
-		{
-			tags: {
-				code: null
-			},
-			conv: function (node) {
-				var node, nodes = node.getElementsByTagName('div');
-				while ((node = nodes[0])) {
-					node.style.display = 'block';
-					convertElement(node, 'span');
-				}
-			}
-		}
-	];
-
-	/**
-	 * Allowed attributes map.
-	 *
-	 * To allow an attribute for all tags use * as the tag name.
-	 *
-	 * Leave empty or null to allow all attributes. (the disallow
-	 * list will be used to filter them instead)
-	 * @type {Object}
-	 * @name jQuery.sceditor.plugins.xhtml.allowedAttribs
-	 * @since v1.4.1
-	 */
-	xhtmlFormat.allowedAttribs = {};
-
-	/**
-	 * Attributes that are not allowed.
-	 *
-	 * Only used if allowed attributes is null or empty.
-	 * @type {Object}
-	 * @name jQuery.sceditor.plugins.xhtml.disallowedAttribs
-	 * @since v1.4.1
-	 */
-	xhtmlFormat.disallowedAttribs = {};
-
-	/**
-	 * Array containing all the allowed tags.
-	 *
-	 * If null or empty all tags will be allowed.
-	 * @type {Array}
-	 * @name jQuery.sceditor.plugins.xhtml.allowedTags
-	 * @since v1.4.1
-	 */
-	xhtmlFormat.allowedTags = [];
-
-	/**
-	 * Array containing all the disallowed tags.
-	 *
-	 * Only used if allowed tags is null or empty.
-	 * @type {Array}
-	 * @name jQuery.sceditor.plugins.xhtml.disallowedTags
-	 * @since v1.4.1
-	 */
-	xhtmlFormat.disallowedTags = [];
-
-	/**
-	 * Array containing tags which should not be removed when empty.
-	 *
-	 * @type {Array}
-	 * @name jQuery.sceditor.plugins.xhtml.allowedEmptyTags
-	 * @since v2.0.0
-	 */
-	xhtmlFormat.allowedEmptyTags = [];
-
-	sceditor.formats.xhtml = xhtmlFormat;
-}(sceditor));

+ 0 - 132
public/js/sc/icons/material.js

@@ -1,132 +0,0 @@
-/**
- * SCEditor SVG material icons plugin
- * http://www.sceditor.com/
- *
- * Copyright (C) 2017, Sam Clarke (samclarke.com)
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- *
- * @author Sam Clarke
- */
-(function (document, sceditor) {
-	'use strict';
-
-	var dom = sceditor.dom;
-
-	/**
-	 * Material icons by Google (Apache license)
-	 * https://github.com/google/material-design-icons/blob/master/LICENSE
-	 *
-	 * Extra icons by materialdesignicons.com and contributors (MIT license)
-	 * https://github.com/Templarian/MaterialDesign-SVG/blob/master/LICENSE
-	 */
-	/* eslint max-len: off*/
-	var icons = {
-		'bold': '<path d="M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z" />',
-		'bulletlist': '<path d="M7,5H21V7H7V5M7,13V11H21V13H7M4,4.5A1.5,1.5 0 0,1 5.5,6A1.5,1.5 0 0,1 4,7.5A1.5,1.5 0 0,1 2.5,6A1.5,1.5 0 0,1 4,4.5M4,10.5A1.5,1.5 0 0,1 5.5,12A1.5,1.5 0 0,1 4,13.5A1.5,1.5 0 0,1 2.5,12A1.5,1.5 0 0,1 4,10.5M7,19V17H21V19H7M4,16.5A1.5,1.5 0 0,1 5.5,18A1.5,1.5 0 0,1 4,19.5A1.5,1.5 0 0,1 2.5,18A1.5,1.5 0 0,1 4,16.5Z" />',
-		'center': '<path d="M3,3H21V5H3V3M7,7H17V9H7V7M3,11H21V13H3V11M7,15H17V17H7V15M3,19H21V21H3V19Z" />',
-		// Cody @XT3000 - https://materialdesignicons.com/
-		'code': '<path d="M8,3A2,2 0 0,0 6,5V9A2,2 0 0,1 4,11H3V13H4A2,2 0 0,1 6,15V19A2,2 0 0,0 8,21H10V19H8V14A2,2 0 0,0 6,12A2,2 0 0,0 8,10V5H10V3M16,3A2,2 0 0,1 18,5V9A2,2 0 0,0 20,11H21V13H20A2,2 0 0,0 18,15V19A2,2 0 0,1 16,21H14V19H16V14A2,2 0 0,1 18,12A2,2 0 0,1 16,10V5H14V3H16Z" />',
-		'color': '<path d="M9.62,12L12,5.67L14.37,12M11,3L5.5,17H7.75L8.87,14H15.12L16.25,17H18.5L13,3H11Z" /><path class="sce-color" d="M0,24H24V20H0V24Z" />',
-		'copy': '<path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" />',
-		'cut': '<path d="M19,3L13,9L15,11L22,4V3M12,12.5A0.5,0.5 0 0,1 11.5,12A0.5,0.5 0 0,1 12,11.5A0.5,0.5 0 0,1 12.5,12A0.5,0.5 0 0,1 12,12.5M6,20A2,2 0 0,1 4,18C4,16.89 4.9,16 6,16A2,2 0 0,1 8,18C8,19.11 7.1,20 6,20M6,8A2,2 0 0,1 4,6C4,4.89 4.9,4 6,4A2,2 0 0,1 8,6C8,7.11 7.1,8 6,8M9.64,7.64C9.87,7.14 10,6.59 10,6A4,4 0 0,0 6,2A4,4 0 0,0 2,6A4,4 0 0,0 6,10C6.59,10 7.14,9.87 7.64,9.64L10,12L7.64,14.36C7.14,14.13 6.59,14 6,14A4,4 0 0,0 2,18A4,4 0 0,0 6,22A4,4 0 0,0 10,18C10,17.41 9.87,16.86 9.64,16.36L12,14L19,21H22V20L9.64,7.64Z" />',
-		'date': '<path d="M7,10H12V15H7M19,19H5V8H19M19,3H18V1H16V3H8V1H6V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3Z" />',
-		'email': '<path d="M20,8L12,13L4,8V6L12,11L20,6M20,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V6C22,4.89 21.1,4 20,4Z" />',
-		'emoticon': '<path d="M12,17.5C14.33,17.5 16.3,16.04 17.11,14H6.89C7.69,16.04 9.67,17.5 12,17.5M8.5,11A1.5,1.5 0 0,0 10,9.5A1.5,1.5 0 0,0 8.5,8A1.5,1.5 0 0,0 7,9.5A1.5,1.5 0 0,0 8.5,11M15.5,11A1.5,1.5 0 0,0 17,9.5A1.5,1.5 0 0,0 15.5,8A1.5,1.5 0 0,0 14,9.5A1.5,1.5 0 0,0 15.5,11M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" />',
-		// JapanYoshi @japanyoshilol - https://materialdesignicons.com/
-		'font': '<path d="M17,8H20V20H21V21H17V20H18V17H14L12.5,20H14V21H10V20H11L17,8M18,9L14.5,16H18V9M5,3H10C11.11,3 12,3.89 12,5V16H9V11H6V16H3V5C3,3.89 3.89,3 5,3M6,5V9H9V5H6Z" />',
-		'format': '<path d="M18,4V3A1,1 0 0,0 17,2H5A1,1 0 0,0 4,3V7A1,1 0 0,0 5,8H17A1,1 0 0,0 18,7V6H19V10H9V21A1,1 0 0,0 10,22H12A1,1 0 0,0 13,21V12H21V4H18Z" />',
-		// Austin Andrews @Templarian - https://materialdesignicons.com/
-		'grip': '<path d="M22,22H20V20H22V22M22,18H20V16H22V18M18,22H16V20H18V22M18,18H16V16H18V18M14,22H12V20H14V22M22,14H20V12H22V14Z" />',
-		// Sam Clarke @samclarke
-		'horizontalrule': '<path d="M 3,3 21,3 21,5 3,5 3,3 M 3,7 15,7 15,9 3,9 3,7 m 0,4 18,0 0,4 -18,0 0,-4" />',
-		'image': '<path d="M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z" />',
-		'indent': '<path d="M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M11,17H21V15H11M3,8V16L7,12M3,21H21V19H3V21Z" />',
-		'italic': '<path d="M10,4V7H12.21L8.79,15H6V18H14V15H11.79L15.21,7H18V4H10Z" />',
-		'justify': '<path d="M3,3H21V5H3V3M3,7H21V9H3V7M3,11H21V13H3V11M3,15H21V17H3V15M3,19H21V21H3V19Z" />		',
-		'left': '<path d="M3,3H21V5H3V3M3,7H15V9H3V7M3,11H21V13H3V11M3,15H15V17H3V15M3,19H21V21H3V19Z" />		',
-		'link': '<path d="M16,6H13V7.9H16C18.26,7.9 20.1,9.73 20.1,12A4.1,4.1 0 0,1 16,16.1H13V18H16A6,6 0 0,0 22,12C22,8.68 19.31,6 16,6M3.9,12C3.9,9.73 5.74,7.9 8,7.9H11V6H8A6,6 0 0,0 2,12A6,6 0 0,0 8,18H11V16.1H8C5.74,16.1 3.9,14.26 3.9,12M8,13H16V11H8V13Z" />',
-		'ltr': '<path d="M21,18L17,14V17H5V19H17V22M9,10V15H11V4H13V15H15V4H17V2H9A4,4 0 0,0 5,6A4,4 0 0,0 9,10Z" />',
-		// Austin Andrews @Templarian - https://materialdesignicons.com/
-		'maximize': '<path d="M9.5,13.09L10.91,14.5L6.41,19H10V21H3V14H5V17.59L9.5,13.09M10.91,9.5L9.5,10.91L5,6.41V10H3V3H10V5H6.41L10.91,9.5M14.5,13.09L19,17.59V14H21V21H14V19H17.59L13.09,14.5L14.5,13.09M13.09,9.5L17.59,5H14V3H21V10H19V6.41L14.5,10.91L13.09,9.5Z" />',
-		'orderedlist': '<path d="M7,13H21V11H7M7,19H21V17H7M7,7H21V5H7M2,11H3.8L2,13.1V14H5V13H3.2L5,10.9V10H2M3,8H4V4H2V5H3M2,17H4V17.5H3V18.5H4V19H2V20H5V16H2V17Z" />',
-		'outdent': '<path d="M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M3,21H21V19H3M3,12L7,16V8M11,17H21V15H11V17Z" />',
-		'paste': '<path d="M19,20H5V4H7V7H17V4H19M12,2A1,1 0 0,1 13,3A1,1 0 0,1 12,4A1,1 0 0,1 11,3A1,1 0 0,1 12,2M19,2H14.82C14.4,0.84 13.3,0 12,0C10.7,0 9.6,0.84 9.18,2H5A2,2 0 0,0 3,4V20A2,2 0 0,0 5,22H19A2,2 0 0,0 21,20V4A2,2 0 0,0 19,2Z" />',
-		'pastetext': '<path d="M19,20H5V4H7V7H17V4H19M12,2A1,1 0 0,1 13,3A1,1 0 0,1 12,4A1,1 0 0,1 11,3A1,1 0 0,1 12,2M19,2H14.82C14.4,0.84 13.3,0 12,0C10.7,0 9.6,0.84 9.18,2H5A2,2 0 0,0 3,4V20A2,2 0 0,0 5,22H19A2,2 0 0,0 21,20V4A2,2 0 0,0 19,2Z" />',
-		'print': '<path d="M18,3H6V7H18M19,12A1,1 0 0,1 18,11A1,1 0 0,1 19,10A1,1 0 0,1 20,11A1,1 0 0,1 19,12M16,19H8V14H16M19,8H5A3,3 0 0,0 2,11V17H6V21H18V17H22V11A3,3 0 0,0 19,8Z" />',
-		'quote': '<path d="M14,17H17L19,13V7H13V13H16M6,17H9L11,13V7H5V13H8L6,17Z" />',
-		'redo': '<path d="M18.4,10.6C16.55,9 14.15,8 11.5,8C6.85,8 2.92,11.03 1.54,15.22L3.9,16C4.95,12.81 7.95,10.5 11.5,10.5C13.45,10.5 15.23,11.22 16.62,12.38L13,16H22V7L18.4,10.6Z" />',
-		'removeformat': '<path d="M6,5V5.18L8.82,8H11.22L10.5,9.68L12.6,11.78L14.21,8H20V5H6M3.27,5L2,6.27L8.97,13.24L6.5,19H9.5L11.07,15.34L16.73,21L18,19.73L3.55,5.27L3.27,5Z" />',
-		'right': '<path d="M3,3H21V5H3V3M9,7H21V9H9V7M3,11H21V13H3V11M9,15H21V17H9V15M3,19H21V21H3V19Z" />',
-		'rtl': '<path d="M8,17V14L4,18L8,22V19H20V17M10,10V15H12V4H14V15H16V4H18V2H10A4,4 0 0,0 6,6A4,4 0 0,0 10,10Z" />',
-		'size': '<path d="M3,12H6V19H9V12H12V9H3M9,4V7H14V19H17V7H22V4H9Z" />',
-		'source': '<path d="M14.6,16.6L19.2,12L14.6,7.4L16,6L22,12L16,18L14.6,16.6M9.4,16.6L4.8,12L9.4,7.4L8,6L2,12L8,18L9.4,16.6Z" />',
-		'strike': '<path d="M3,14H21V12H3M5,4V7H10V10H14V7H19V4M10,19H14V16H10V19Z" />',
-		// Austin Andrews @Templarian - https://materialdesignicons.com/
-		'subscript': '<path d="M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,21.03H16.97V20.03L17.86,19.23C18.62,18.58 19.18,18.04 19.56,17.6C19.93,17.16 20.12,16.75 20.13,16.36C20.14,16.08 20.05,15.85 19.86,15.66C19.68,15.5 19.39,15.38 19,15.38C18.69,15.38 18.42,15.44 18.16,15.56L17.5,15.94L17.05,14.77C17.32,14.56 17.64,14.38 18.03,14.24C18.42,14.1 18.85,14 19.32,14C20.1,14.04 20.7,14.25 21.1,14.66C21.5,15.07 21.72,15.59 21.72,16.23C21.71,16.79 21.53,17.31 21.18,17.78C20.84,18.25 20.42,18.7 19.91,19.14L19.27,19.66V19.68H21.85V21.03Z" />',
-		// Austin Andrews @Templarian - https://materialdesignicons.com/
-		'superscript': '<path d="M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z" />',
-		// Austin Andrews @Templarian - https://materialdesignicons.com/
-		'table': '<path d="M5,4H19A2,2 0 0,1 21,6V18A2,2 0 0,1 19,20H5A2,2 0 0,1 3,18V6A2,2 0 0,1 5,4M5,8V12H11V8H5M13,8V12H19V8H13M5,14V18H11V14H5M13,14V18H19V14H13Z" />',
-		'time': '<path d="M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z" />',
-		'underline': '<path d="M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z" />',
-		'undo': '<path d="M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z" />',
-		// Austin Andrews @Templarian - https://materialdesignicons.com/
-		'unlink': '<path d="M2,5.27L3.28,4L20,20.72L18.73,22L14.73,18H13V16.27L9.73,13H8V11.27L5.5,8.76C4.5,9.5 3.9,10.68 3.9,12C3.9,14.26 5.74,16.1 8,16.1H11V18H8A6,6 0 0,1 2,12C2,10.16 2.83,8.5 4.14,7.41L2,5.27M16,6A6,6 0 0,1 22,12C22,14.21 20.8,16.15 19,17.19L17.6,15.77C19.07,15.15 20.1,13.7 20.1,12C20.1,9.73 18.26,7.9 16,7.9H13V6H16M8,6H11V7.9H9.72L7.82,6H8M16,11V13H14.82L12.82,11H16Z" />',
-		'youtube': '<path d="M10,16.5V7.5L16,12M20,4.4C19.4,4.2 15.7,4 12,4C8.3,4 4.6,4.19 4,4.38C2.44,4.9 2,8.4 2,12C2,15.59 2.44,19.1 4,19.61C4.6,19.81 8.3,20 12,20C15.7,20 19.4,19.81 20,19.61C21.56,19.1 22,15.59 22,12C22,8.4 21.56,4.91 20,4.4Z" />'
-	};
-
-	sceditor.icons.material = function () {
-		var nodes = {};
-
-		var colorPath;
-
-		return {
-			create: function (command) {
-				if (command in icons) {
-					// Using viewbox="1 1 22 22" to trim off the 1 unit border
-					// around the SVG icons.
-					// Default is viewbox="0 0 24 24"
-					nodes[command] = sceditor.dom.parseHTML(
-						'<svg xmlns="http://www.w3.org/2000/svg" ' +
-							'viewbox="1 1 22 22" unselectable="on">' +
-								icons[command] +
-						'</svg>'
-					).firstChild;
-
-					if (command === 'color') {
-						colorPath = nodes[command].querySelector('.sce-color');
-					}
-				}
-
-				return nodes[command];
-			},
-			update: function (isSourceMode, currentNode) {
-				if (colorPath) {
-					var color = 'inherit';
-
-					if (!isSourceMode && currentNode) {
-						color = currentNode.ownerDocument
-							.queryCommandValue('forecolor');
-					}
-
-					dom.css(colorPath, 'fill', color);
-				}
-			},
-			rtl: function (isRtl) {
-				var gripNode = nodes.grip;
-
-				if (gripNode) {
-					var transform = isRtl ? 'scaleX(-1)' : '';
-
-					dom.css(gripNode, 'transform', transform);
-					dom.css(gripNode, 'msTransform', transform);
-					dom.css(gripNode, 'webkitTransform', transform);
-				}
-			}
-		};
-	};
-
-	sceditor.icons.material.icons = icons;
-})(document, sceditor);

+ 0 - 110
public/js/sc/plugins/autosave.js

@@ -1,110 +0,0 @@
-/**
- * SCEditor AutoSave Plugin
- * http://www.sceditor.com/
- *
- * Copyright (C) 2017, Sam Clarke (samclarke.com)
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- *
- * @author Sam Clarke
- */
-(function (sceditor) {
-	'use strict';
-
-	var defaultKey = 'sce-autodraft-' + location.pathname + location.search;
-
-	function clear(key) {
-		localStorage.removeItem(key || defaultKey);
-	}
-
-	sceditor.plugins.autosave = function () {
-		var base = this;
-		var editor;
-		var isLoading = false;
-		var storageKey = defaultKey;
-		// 86400000 = 24 hrs (24 * 60 * 60 * 1000)
-		var expires = 86400000;
-		var saveHandler = function (value) {
-			localStorage.setItem(storageKey, JSON.stringify(value));
-		};
-		var loadHandler = function () {
-			return JSON.parse(localStorage.getItem(storageKey));
-		};
-
-		function gc() {
-			for (var i = 0; i < localStorage.length; i++) {
-				var key = localStorage.key(i);
-
-				if (/^sce\-autodraft\-/.test(key)) {
-					var item = JSON.parse(localStorage.getItem(storageKey));
-					if (item && item.time < Date.now() - expires) {
-						clear(key);
-					}
-				}
-			}
-		}
-
-		base.init = function () {
-			editor = this;
-			var opts = editor.opts && editor.opts.autosave || {};
-
-			saveHandler = opts.save || saveHandler;
-			loadHandler = opts.load || loadHandler;
-			storageKey = opts.storageKey || storageKey;
-			expires = opts.expires || expires;
-
-			gc();
-		};
-
-		base.signalReady = function () {
-			// Add submit event listener to clear autosave
-			var parent = editor.getContentAreaContainer();
-			while (parent) {
-				if (/form/i.test(parent.nodeName)) {
-					parent.addEventListener(
-						'submit', clear.bind(null, storageKey), true
-					);
-					break;
-				}
-
-				parent = parent.parentNode;
-			}
-
-			var state = loadHandler();
-			if (state) {
-				isLoading = true;
-				editor.sourceMode(state.sourceMode);
-				editor.val(state.value, false);
-				editor.focus();
-
-				if (state.sourceMode) {
-					editor.sourceEditorCaret(state.caret);
-				} else {
-					editor.getRangeHelper().restoreRange();
-				}
-				isLoading = false;
-			} else {
-				saveHandler({
-					caret: this.sourceEditorCaret(),
-					sourceMode: this.sourceMode(),
-					value: editor.val(null, false),
-					time: Date.now()
-				});
-			}
-		};
-
-		base.signalValuechangedEvent = function (e) {
-			if (!isLoading) {
-				saveHandler({
-					caret: this.sourceEditorCaret(),
-					sourceMode: this.sourceMode(),
-					value: e.detail.rawValue,
-					time: Date.now()
-				});
-			}
-		};
-	};
-
-	sceditor.plugins.autosave.clear = clear;
-}(sceditor));

+ 0 - 106
public/js/sc/plugins/autoyoutube.js

@@ -1,106 +0,0 @@
-/**
- * SCEditor Auto Youtube Plugin
- * http://www.sceditor.com/
- *
- * Copyright (C) 2016, Sam Clarke (samclarke.com)
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- *
- * @author Sam Clarke
- */
-(function (document, sceditor) {
-	'use strict';
-
-	var dom = sceditor.dom;
-
-	/*
-		(^|\s)					Start of line or space
-		(?:https?:\/\/)?  		Optional scheme like http://
-		(?:www\.)?      		Optional www. prefix
-		(?:
-			youtu\.be\/     	Ends with .be/ so whatever comes next is the ID
-		|
-			youtube\.com\/watch\?v=		Matches the .com version
-		)
-		([^"&?\/ ]{11}) 				The actual YT ID
-		(?:\&[\&_\?0-9a-z\#]+)?			Any extra URL params
-		(\s|$)							End of line or space
-	*/
-	var ytUrlRegex = /(^|\s)(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/watch\?v=)([^"&?\/ ]{11})(?:\&[\&_\?0-9a-z\#]+)?(\s|$)/i;
-
-	function youtubeEmbedCode(id) {
-		return '<iframe width="560" height="315" frameborder="0" ' +
-			'src="https://www.youtube-nocookie.com/embed/' + id + '" ' +
-			'data-youtube-id="' + id + '" allowfullscreen></iframe>';
-	}
-
-	function convertYoutubeLinks(parent, isRoot) {
-		var node = parent.firstChild;
-		var wholeContent = (parent.textContent || '');
-
-		// Don't care about whitespace if is the root node
-		if (isRoot) {
-			wholeContent = wholeContent.trim();
-		}
-
-		var match = wholeContent.match(ytUrlRegex);
-		// Whole content match so only return URL embed
-		if (wholeContent === wholeContent.trim() && match &&
-			match[0].length === wholeContent.length) {
-			dom.removeAttr(parent, 'style');
-			dom.removeAttr(parent, 'class');
-			parent.innerHTML = youtubeEmbedCode(match[2]);
-			return;
-		}
-
-		while (node) {
-			// 3 is TextNodes
-			if (node.nodeType === 3) {
-				var text   = node.nodeValue;
-				var nodeParent = node.parentNode;
-
-				if ((match = text.match(ytUrlRegex))) {
-					nodeParent.insertBefore(document.createTextNode(
-						text.substr(0, match.index) + match[1]
-					), node);
-
-					nodeParent.insertBefore(
-						dom.parseHTML(youtubeEmbedCode(match[2])), node
-					);
-
-					node.nodeValue = match[3] +
-						text.substr(match.index + match[0].length);
-				}
-			} else {
-				// TODO: Make this tag configurable.
-				if (!dom.is(node, 'code')) {
-					convertYoutubeLinks(node);
-				}
-			}
-
-			node = node.nextSibling;
-		}
-	};
-
-	sceditor.plugins.autoyoutube = function () {
-		this.signalPasteRaw = function (data) {
-			// TODO: Make this tag configurable.
-			// Skip code tags
-			if (dom.closest(this.currentNode(), 'code')) {
-				return;
-			}
-
-			if (data.html || data.text) {
-				var node = document.createElement('div');
-
-				node.innerHTML = data.html ||
-					sceditor.escapeEntities(data.text);
-
-				convertYoutubeLinks(node, true);
-
-				data.html = node.innerHTML;
-			}
-		};
-	};
-})(document, sceditor);

+ 0 - 222
public/js/sc/plugins/dragdrop.js

@@ -1,222 +0,0 @@
-/**
- * SCEditor Drag and Drop Plugin
- * http://www.sceditor.com/
- *
- * Copyright (C) 2017, Sam Clarke (samclarke.com)
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- *
- * @author Sam Clarke
- */
-(function (sceditor) {
-	'use strict';
-
-	/**
-	 * Place holder GIF shown while image is loading.
-	 * @type {string}
-	 * @private
-	 */
-	var loadingGif = 'data:image/gif;base64,R0lGODlhlgBkAPABAH19ffb29iH5BAAK' +
-		'AAAAIf4aQ3JlYXRlZCB3aXRoIGFqYXhsb2FkLmluZm8AIf8LTkVUU0NBUEUyLjADAQA' +
-		'AACwAAAAAlgBkAAAC1YyPqcvtD6OctNqLs968+w+G4kiW5omm6sq27gvH8kzX9o3n+s' +
-		'73/g8MCofEovGITCqXzKbzCY1Kp9Sq9YrNarfcrvcLDovH5LL5jE6r1+y2+w2Py+f0u' +
-		'v2OvwD2fP6iD/gH6Pc2GIhg2JeQSNjGuLf4GMlYKIloefAIUEl52ZmJyaY5mUhqyFnq' +
-		'mQr6KRoaMKp66hbLumpQ69oK+5qrOyg4a6qYV2x8jJysvMzc7PwMHS09TV1tfY2drb3' +
-		'N3e39DR4uPk5ebn6Onq6+zt7u/g4fL99UAAAh+QQACgAAACwAAAAAlgBkAIEAAAB9fX' +
-		'329vYAAAAC3JSPqcvtD6OctNqLs968+w+G4kiW5omm6sq27gvH8kzX9o3n+s73/g8MC' +
-		'ofEovGITCqXzKbzCY1Kp9Sq9YrNarfcrvcLDovH5LL5jE6r1+y2+w2Py+f0uv2OvwD2' +
-		'fP4iABgY+CcoCNeHuJdQyLjIaOiWiOj4CEhZ+SbZd/nI2RipqYhQOThKGpAZCuBZyAr' +
-		'ZprpqSupaCqtaazmLCRqai7rb2av5W5wqSShcm8fc7PwMHS09TV1tfY2drb3N3e39DR' +
-		'4uPk5ebn6Onq6+zt7u/g4fLz9PX29/j5/vVAAAIfkEAAoAAAAsAAAAAJYAZACBAAAAf' +
-		'X199vb2AAAAAuCUj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/JM1/aN5/rO9/4P' +
-		'DAqHxKLxiEwql8ym8wmNSqfUqvWKzWq33K73Cw6Lx+Sy+YxOq9fstvsNj8vn9Lr9jr8' +
-		'E9nz+AgAYGLjQVwhXiJgguAiYgGjo9tinyCjoKLn3hpmJUGmJsBmguUnpCXCJOZraaX' +
-		'oKShoJe9DqehCqKlnqiZobuzrbyvuIO8xqKpxIPKlwrPCbBx0tPU1dbX2Nna29zd3t/' +
-		'Q0eLj5OXm5+jp6uvs7e7v4OHy8/T19vf4+fr7/P379UAAAh+QQACgAAACwAAAAAlgBk' +
-		'AIEAAAB9fX329vYAAAAC4JSPqcvtD6OctNqLs968+w+G4kiW5omm6sq27gvH8kzX9o3' +
-		'n+s73/g8MCofEovGITCqXzKbzCY1Kp9Sq9YrNarfcrvcLDovH5LL5jE6r1+y2+w2Py+' +
-		'f0uv2OvwT2fP6iD7gAMEhICAeImIAYiFDoOPi22KcouZfw6BhZGUBZeYlp6LbJiTD6C' +
-		'Qqg6Vm6eQqqKtkZ24iaKtrKunpQa9tmmju7Wwu7KFtMi3oYDMzompkHHS09TV1tfY2d' +
-		'rb3N3e39DR4uPk5ebn6Onq6+zt7u/g4fLz9PX29/j5+vv8/f31QAADs=';
-
-	/**
-	 * Basic check for browser support
-	 * @type {boolean}
-	 * @private
-	 */
-	var isSupported = typeof window.FileReader !== 'undefined';
-	var base64DataUri = /data:[^;]+;base64,/i;
-
-	function base64DataUriToBlob(url) {
-		// 5 is length of "data:" prefix
-		var mime = url.substr(5, url.indexOf(';') - 5);
-		var data = atob(url.substr(url.indexOf(',') + 1));
-		/* global Uint8Array */
-		var binary = new Uint8Array(data.length);
-
-		for (var i = 0; i < data.length; i++) {
-			binary[i] = data[i].charCodeAt(0);
-		}
-
-		try {
-			return new Blob([binary], { type: mime });
-		} catch (e) {
-			return null;
-		}
-	}
-
-	sceditor.plugins.dragdrop = function () {
-		if (!isSupported) {
-			return;
-		}
-
-		var base = this;
-		var	opts;
-		var editor;
-		var handleFile;
-		var container;
-		var cover;
-		var placeholderId = 0;
-
-
-		function hideCover() {
-			cover.style.display = 'none';
-			container.className = container.className.replace(/(^| )dnd( |$)/g, '');
-		}
-
-		function showCover() {
-			if (cover.style.display === 'none') {
-				cover.style.display = 'block';
-				container.className += ' dnd';
-			}
-		}
-
-		function isAllowed(file) {
-			// FF sets type to application/x-moz-file until it has been dropped
-			if (file.type !== 'application/x-moz-file' && opts.allowedTypes &&
-				opts.allowedTypes.indexOf(file.type) < 0) {
-				return false;
-			}
-
-			return opts.isAllowed ? opts.isAllowed(file) : true;
-		};
-
-		function createHolder(toReplace) {
-			var placeholder = document.createElement('img');
-			placeholder.src = loadingGif;
-			placeholder.className = 'sceditor-ignore';
-			placeholder.id = 'sce-dragdrop-' + placeholderId++;
-
-			function replace(html) {
-				var node = editor
-					.getBody()
-					.ownerDocument
-					.getElementById(placeholder.id);
-
-				if (node) {
-					if (typeof html === 'string') {
-						node.insertAdjacentHTML('afterend', html);
-					}
-
-					node.parentNode.removeChild(node);
-				}
-			}
-
-			return function () {
-				if (toReplace) {
-					toReplace.parentNode.replaceChild(placeholder, toReplace);
-				} else {
-					editor.wysiwygEditorInsertHtml(placeholder.outerHTML);
-				}
-
-				return {
-					insert: function (html) {
-						replace(html);
-					},
-					cancel: replace
-				};
-			};
-		}
-
-		function handleDragOver(e) {
-			var dt    = e.dataTransfer;
-			var files = dt.files.length || !dt.items ? dt.files : dt.items;
-
-			for (var i = 0; i < files.length; i++) {
-				// Dragging a string should be left to default
-				if (files[i].kind === 'string') {
-					return;
-				}
-			}
-
-			showCover();
-			e.preventDefault();
-		}
-
-		function handleDrop(e) {
-			var dt    = e.dataTransfer;
-			var files = dt.files.length || !dt.items ? dt.files : dt.items;
-
-			hideCover();
-
-			for (var i = 0; i < files.length; i++) {
-				// Dragging a string should be left to default
-				if (files[i].kind === 'string') {
-					return;
-				}
-
-				if (isAllowed(files[i])) {
-					handleFile(files[i], createHolder());
-				}
-			}
-
-			e.preventDefault();
-		}
-
-		base.signalReady = function () {
-			editor = this;
-			opts = editor.opts.dragdrop || {};
-			handleFile = opts.handleFile;
-
-			container = editor.getContentAreaContainer().parentNode;
-
-			cover = container.appendChild(sceditor.dom.parseHTML(
-				'<div class="sceditor-dnd-cover" style="display: none">' +
-					'<p>' + editor._('Drop files here') + '</p>' +
-				'</div>'
-			).firstChild);
-
-			container.addEventListener('dragover', handleDragOver);
-			container.addEventListener('dragleave', hideCover);
-			container.addEventListener('dragend', hideCover);
-			container.addEventListener('drop', handleDrop);
-
-			editor.getBody().addEventListener('dragover', handleDragOver);
-			editor.getBody().addEventListener('drop', hideCover);
-		};
-
-		base.signalPasteHtml = function (paste) {
-			if (!('handlePaste' in opts) || opts.handlePaste) {
-				var div = document.createElement('div');
-				div.innerHTML = paste.val;
-
-				var images = div.querySelectorAll('img');
-				for (var i = 0; i < images.length; i++) {
-					var image = images[i];
-
-					if (base64DataUri.test(image.src)) {
-						var file = base64DataUriToBlob(image.src);
-						if (file && isAllowed(file)) {
-							handleFile(file, createHolder(image));
-						} else {
-							image.parentNode.removeChild(image);
-						}
-					}
-				}
-
-				paste.val = div.innerHTML;
-			}
-		};
-	};
-})(sceditor);

+ 0 - 127
public/js/sc/plugins/format.js

@@ -1,127 +0,0 @@
-/**
- * SCEditor Paragraph Formatting Plugin
- * http://www.sceditor.com/
- *
- * Copyright (C) 2011-2013, Sam Clarke (samclarke.com)
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- *
- * @fileoverview SCEditor Paragraph Formatting Plugin
- * @author Sam Clarke
- */
-(function (sceditor) {
-	'use strict';
-
-	sceditor.plugins.format = function () {
-		var base = this;
-
-		/**
-		 * Default tags
-		 * @type {Object}
-		 * @private
-		 */
-		var tags = {
-			p: 'Paragraph',
-			h1: 'Heading 1',
-			h2: 'Heading 2',
-			h3: 'Heading 3',
-			h4: 'Heading 4',
-			h5: 'Heading 5',
-			h6: 'Heading 6',
-			address: 'Address',
-			pre: 'Preformatted Text'
-		};
-
-		/**
-		 * Private functions
-		 * @private
-		 */
-		var	insertTag,
-			formatCmd;
-
-
-		base.init = function () {
-			var	opts  = this.opts,
-				pOpts = opts.paragraphformat;
-
-			// Don't enable if the BBCode plugin is enabled.
-			if (opts.format && opts.format === 'bbcode') {
-				return;
-			}
-
-			if (pOpts) {
-				if (pOpts.tags) {
-					tags = pOpts.tags;
-				}
-
-				if (pOpts.excludeTags) {
-					pOpts.excludeTags.forEach(function (val) {
-						delete tags[val];
-					});
-				}
-			}
-
-			if (!this.commands.format) {
-				this.commands.format = {
-					exec: formatCmd,
-					txtExec: formatCmd,
-					tooltip: 'Format Paragraph'
-				};
-			}
-
-			if (opts.toolbar === sceditor.defaultOptions.toolbar) {
-				opts.toolbar = opts.toolbar.replace(',color,',
-					',color,format,');
-			}
-		};
-
-		/**
-		 * Inserts the specified tag into the editor
-		 *
-		 * @param  {sceditor} editor
-		 * @param  {string} tag
-		 * @private
-		 */
-		insertTag = function (editor, tag) {
-			if (editor.sourceMode()) {
-				editor.insert('<' + tag + '>', '</' + tag + '>');
-			} else {
-				editor.execCommand('formatblock', '<' + tag + '>');
-			}
-
-		};
-
-		/**
-		 * Function for the exec and txtExec properties
-		 *
-		 * @param  {node} caller
-		 * @private
-		 */
-		formatCmd = function (caller) {
-			var	editor   = this,
-				content = document.createElement('div');
-
-			sceditor.utils.each(tags, function (tag, val) {
-				var link = document.createElement('a');
-				link.className = 'sceditor-option';
-				link.textContent = val.name || val;
-				link.addEventListener('click', function (e) {
-					editor.closeDropDown(true);
-
-					if (val.exec) {
-						val.exec(editor);
-					} else {
-						insertTag(editor, tag);
-					}
-
-					e.preventDefault();
-				});
-
-				content.appendChild(link);
-			});
-
-			editor.createDropDown(caller, 'format', content);
-		};
-	};
-})(sceditor);

+ 0 - 78
public/js/sc/plugins/plaintext.js

@@ -1,78 +0,0 @@
-/**
- * SCEditor Plain Text Plugin
- * http://www.sceditor.com/
- *
- * Copyright (C) 2016, Sam Clarke (samclarke.com)
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- *
- * @author Sam Clarke
- */
-(function (sceditor) {
-	'use strict';
-
-	var utils = sceditor.utils;
-	var dom = sceditor.dom;
-
-	/**
-	 * Options:
-	 *
-	 * pastetext.addButton - If to replace the plaintext button with a toggle
-	 *                       button that enables and disables plain text mode.
-	 *
-	 * pastetext.enabled - If the plain text button should be enabled at start
-	 *                     up. Only applies if addButton is enabled.
-	 */
-	sceditor.plugins.plaintext = function () {
-		var plainTextEnabled = true;
-
-		this.init = function () {
-			var commands = this.commands;
-			var opts = this.opts;
-
-			if (opts && opts.plaintext && opts.plaintext.addButton) {
-				plainTextEnabled = opts.plaintext.enabled;
-
-				commands.pastetext = utils.extend(commands.pastetext || {}, {
-					state: function () {
-						return plainTextEnabled ? 1 : 0;
-					},
-					exec: function () {
-						plainTextEnabled = !plainTextEnabled;
-					}
-				});
-			}
-		};
-
-		this.signalPasteRaw = function (data) {
-			if (plainTextEnabled) {
-				if (data.html && !data.text) {
-					var div = document.createElement('div');
-					div.innerHTML = data.html;
-
-					// TODO: Refactor into private shared module with editor
-					// innerText adds two newlines after <p> tags so convert
-					// them to <div> tags
-					utils.each(div.querySelectorAll('p'), function (_, elm) {
-						dom.convertElement(elm, 'div');
-					});
-					// Remove collapsed <br> tags as innerText converts them to
-					// newlines
-					utils.each(div.querySelectorAll('br'), function (_, elm) {
-						if (!elm.nextSibling ||
-						!dom.isInline(elm.nextSibling, true)) {
-							elm.parentNode.removeChild(elm);
-						}
-					});
-
-					document.body.appendChild(div);
-					data.text = div.innerText;
-					document.body.removeChild(div);
-				}
-
-				data.html = null;
-			}
-		};
-	};
-}(sceditor));

+ 0 - 372
public/js/sc/plugins/undo.js

@@ -1,372 +0,0 @@
-(function (sceditor) {
-	'use strict';
-
-	sceditor.plugins.undo = function () {
-		var base = this;
-		var sourceEditor;
-		var editor;
-		var body;
-		var lastInputType = '';
-		var charChangedCount = 0;
-		var isInPatchedFn = false;
-		/**
-		 * If currently restoring a state
-		 * Should ignore events while it's happening
-		 */
-		var isApplying = false;
-		/**
-		 * If current selection change event has already been stored
-		 */
-		var isSelectionChangeHandled = false;
-
-		var undoLimit  = 50;
-		var undoStates = [];
-		var redoPosition = 0;
-		var lastState;
-
-		/**
-		 * Sets the editor to the specified state.
-		 * @param  {Object} state
-		 * @private
-		 */
-		function applyState(state) {
-			isApplying = true;
-			editor.sourceMode(state.sourceMode);
-
-			if (state.sourceMode) {
-				editor.val(state.value, false);
-				editor.sourceEditorCaret(state.caret);
-			} else {
-				editor.getBody().innerHTML = state.value;
-
-				// Caret may not exist for the first state in Firefox
-				if (state.caret) {
-					var range = editor.getRangeHelper().selectedRange();
-					setRangePositions(range, state.caret);
-					editor.getRangeHelper().selectRange(range);
-				}
-			}
-
-			editor.focus();
-			isApplying = false;
-		};
-
-		/**
-		 * Patches a function on the object to call store() after invocation
-		 * @param {Object} obj
-		 * @param {string} fn
-		 */
-		function patch(obj, fn) {
-			var origFn = obj[fn];
-			obj[fn] = function () {
-				// sourceMode calls other patched methods so need to ignore them
-				var ignore = isInPatchedFn;
-
-				// Store caret position before any change is made
-				if (!ignore && !isApplying && lastState &&
-						editor.getRangeHelper().hasSelection()) {
-					updateLastState();
-				}
-
-				isInPatchedFn = true;
-				origFn.apply(this, arguments);
-
-				if (!ignore) {
-					isInPatchedFn = false;
-
-					if (!isApplying) {
-						storeState();
-						lastInputType = '';
-					}
-				}
-			};
-		}
-
-		/**
-		 * Stores the editors current state
-		 */
-		function storeState() {
-			if (redoPosition) {
-				undoStates.length -= redoPosition;
-				redoPosition = 0;
-			}
-
-			if (undoLimit > 0 && undoStates.length > undoLimit) {
-				undoStates.shift();
-			}
-
-			lastState = {};
-			updateLastState();
-			undoStates.push(lastState);
-		}
-
-		/**
-		 * Updates the last saved state with the editors current state
-		 */
-		function updateLastState() {
-			var sourceMode = editor.sourceMode();
-			lastState.caret = sourceMode ? editor.sourceEditorCaret() :
-				getRangePositions(editor.getRangeHelper().selectedRange());
-			lastState.sourceMode = sourceMode;
-			lastState.value = sourceMode ?
-				editor.getSourceEditorValue(false) :
-				editor.getBody().innerHTML;
-		}
-
-		base.init = function () {
-			// The this variable will be set to the instance of the editor
-			// calling it, hence why the plugins "this" is saved to the base
-			// variable.
-			editor = this;
-
-			undoLimit = editor.undoLimit || undoLimit;
-
-			editor.addShortcut('ctrl+z', base.undo);
-			editor.addShortcut('ctrl+shift+z', base.redo);
-			editor.addShortcut('ctrl+y', base.redo);
-		};
-
-		function documentSelectionChangeHandler() {
-			if (sourceEditor === document.activeElement) {
-				base.signalSelectionchangedEvent();
-			}
-		}
-
-		base.signalReady = function () {
-			sourceEditor = editor.getContentAreaContainer().nextSibling;
-			body = editor.getBody();
-
-			// Store initial state
-			storeState();
-
-			// Patch methods that allow inserting content into the editor
-			// programmatically
-			// TODO: remove this when there is a built in event to handle it
-			patch(editor, 'setWysiwygEditorValue');
-			patch(editor, 'setSourceEditorValue');
-			patch(editor, 'sourceEditorInsertText');
-			patch(editor.getRangeHelper(), 'insertNode');
-			patch(editor, 'toggleSourceMode');
-
-			/**
-			 * Handles the before input event so can override built in
-			 * undo / redo
-			 * @param {InputEvent} e
-			 */
-			function beforeInputHandler(e) {
-				if (e.inputType === 'historyUndo') {
-					base.undo();
-					e.preventDefault();
-				} else if (e.inputType === 'historyRedo') {
-					base.redo();
-					e.preventDefault();
-				}
-			}
-
-			body.addEventListener('beforeinput', beforeInputHandler);
-			sourceEditor.addEventListener('beforeinput', beforeInputHandler);
-
-			/**
-			 * Should always store state at the end of composing
-			 */
-			function compositionHandler() {
-				lastInputType = '';
-				storeState();
-			}
-			body.addEventListener('compositionend', compositionHandler);
-			sourceEditor.addEventListener('compositionend', compositionHandler);
-
-			// Chrome doesn't trigger selectionchange on textarea so need to
-			// listen to global event
-			document.addEventListener('selectionchange',
-				documentSelectionChangeHandler);
-		};
-
-		base.destroy = function () {
-			document.removeEventListener('selectionchange',
-				documentSelectionChangeHandler);
-		};
-
-		base.undo = function () {
-			lastState = null;
-
-			if (redoPosition < undoStates.length - 1) {
-				redoPosition++;
-				applyState(undoStates[undoStates.length - 1 - redoPosition]);
-			}
-
-			return false;
-		};
-
-		base.redo = function () {
-			if (redoPosition > 0) {
-				redoPosition--;
-				applyState(undoStates[undoStates.length - 1 - redoPosition]);
-			}
-
-			return false;
-		};
-
-		/**
-		 * Handle the selectionchanged event so can store the last caret
-		 * position before the input so undoing places it in the right place
-		 */
-		base.signalSelectionchangedEvent = function () {
-			if (isApplying || isSelectionChangeHandled) {
-				isSelectionChangeHandled = false;
-				return;
-			}
-			if (lastState) {
-				updateLastState();
-			}
-			lastInputType = '';
-		};
-
-		/**
-		 * Handles the input event
-		 * @param {InputEvent} e
-		 */
-		base.signalInputEvent = function (e) {
-			// InputType is one of
-			// https://rawgit.com/w3c/input-events/v1/index.html#interface-InputEvent-Attributes
-			// Most should cause a full undo item to be added so only need to
-			// handle a few of them
-			var inputType = e.inputType;
-
-			// Should ignore selection changes that occur because of input
-			// events as already handling them
-			isSelectionChangeHandled = true;
-
-			// inputType should be supported by all supported browsers
-			// except IE 11 in runWithoutWysiwygSupport. Shouldn't be an issue
-			// as native handling will mostly work there.
-			// Ignore if composing as will handle composition end instead
-			if (!inputType || e.isComposing) {
-				return;
-			}
-
-			switch (e.inputType) {
-				case 'deleteContentBackward':
-					if (lastState && lastInputType === inputType &&
-						charChangedCount < 20) {
-						updateLastState();
-					} else {
-						storeState();
-						charChangedCount = 0;
-					}
-
-					lastInputType = inputType;
-					break;
-
-				case 'insertText':
-					charChangedCount += e.data ? e.data.length : 1;
-
-					if (lastState && lastInputType === inputType &&
-							charChangedCount < 20 && !/\s$/.test(e.data)) {
-						updateLastState();
-					} else {
-						storeState();
-						charChangedCount = 0;
-					}
-
-					lastInputType = inputType;
-					break;
-				default:
-					lastInputType = 'sce-misc';
-					charChangedCount = 0;
-					storeState();
-					break;
-			}
-		};
-
-		/**
-		 * Creates a positions object form passed range
-		 * @param {Range} range
-		 * @return {Object<string, Array<number>}
-		 */
-		function getRangePositions(range) {
-			// In Firefox, range may not exist when the editor is first created
-			// due to Firefox returning null from getSelection() when the
-			// editors iframe is first created. See issue #910
-			if (!range) {
-				return;
-			}
-
-			// Merge any adjacent text nodes as it will be done by innerHTML
-			// which would cause positions to be off if not done
-			body.normalize();
-
-			return {
-				startPositions:
-					nodeToPositions(range.startContainer, range.startOffset),
-				endPositions:
-					nodeToPositions(range.endContainer, range.endOffset)
-			};
-		}
-
-		/**
-		 * Sets the range start/end based on the positions object
-		 * @param {Range} range
-		 * @param {Object<string, Array<number>>} positions
-		 */
-		function setRangePositions(range, positions) {
-			try {
-				var startPositions = positions.startPositions;
-				var endPositions = positions.endPositions;
-
-				range.setStart(positionsToNode(body, startPositions),
-					startPositions[0]);
-				range.setEnd(positionsToNode(body, endPositions),
-					endPositions[0]);
-			} catch (e) {
-				if (console && console.warn) {
-					console.warn('[SCEditor] Undo plugin lost caret', e);
-				}
-			}
-		}
-
-		/**
-		 * Converts the passed container and offset into positions array
-		 * @param {Node} container
-		 * @param {number} offset
-		 * @returns {Array<number>}
-		 */
-		function nodeToPositions(container, offset) {
-			var positions = [offset];
-			var node = container;
-
-			while (node && node.tagName !== 'BODY') {
-				positions.push(nodeIndex(node));
-				node = node.parentNode;
-			}
-
-			return positions;
-		}
-
-		/**
-		 * Returns index of passed node
-		 * @param {Node} node
-		 * @returns {number}
-		 */
-		function nodeIndex(node) {
-			var i = 0;
-			while ((node = node.previousSibling)) {
-				i++;
-			}
-			return i;
-		}
-
-		/**
-		 * Gets the container node from the positions array
-		 * @param {Node} node
-		 * @param {Array<number>} positions
-		 * @returns {Node}
-		 */
-		function positionsToNode(node, positions) {
-			for (var i = positions.length - 1; node && i > 0; i--) {
-				node = node.childNodes[positions[i]];
-			}
-			return node;
-		}
-	};
-}(sceditor));

+ 0 - 97
public/js/sc/plugins/v1compat.js

@@ -1,97 +0,0 @@
-/**
- * Version 1 compatibility plugin
- *
- * Patches commands and BBCodes set with
- * command.set and bbcode.set to wrap DOM
- * node arguments in jQuery objects.
- *
- * Should only be used to ease migrating.
- */
-(function (sceditor, $) {
-	'use strict';
-
-	var plugins = sceditor.plugins;
-
-	/**
-	 * Patches a method to wrap and DOM nodes in a jQuery object
-	 * @private
-	 */
-	function patchMethodArguments(fn) {
-		if (fn._scePatched) {
-			return fn;
-		}
-
-		var patch = function () {
-			var args = [];
-
-			for (var i = 0; i < arguments.length; i++) {
-				var arg = arguments[i];
-
-				if (arg && arg.nodeType) {
-					args.push($(arg));
-				} else {
-					args.push(arg);
-				}
-			}
-
-			return fn.apply(this, args);
-		};
-
-		patch._scePatched = true;
-		return patch;
-	}
-
-	/**
-	 * Patches a method to wrap any return value in a jQuery object
-	 * @private
-	 */
-	function patchMethodReturn(fn) {
-		if (fn._scePatched) {
-			return fn;
-		}
-
-		var patch = function () {
-			return $(fn.apply(this, arguments));
-		};
-
-		patch._scePatched = true;
-		return patch;
-	}
-
-	var oldSet = sceditor.command.set;
-	sceditor.command.set = function (name, cmd) {
-		if (cmd && typeof cmd.exec === 'function') {
-			cmd.exec = patchMethodArguments(cmd.exec);
-		}
-
-		if (cmd && typeof cmd.txtExec === 'function') {
-			cmd.txtExec = patchMethodArguments(cmd.txtExec);
-		}
-
-		return oldSet.call(this, name, cmd);
-	};
-
-	if (plugins.bbcode) {
-		var oldBBCodeSet = plugins.bbcode.bbcode.set;
-		plugins.bbcode.bbcode.set = function (name, bbcode) {
-			if (bbcode && typeof bbcode.format === 'function') {
-				bbcode.format = patchMethodArguments(bbcode.format);
-			}
-
-			return oldBBCodeSet.call(this, name, bbcode);
-		};
-	};
-
-	var oldCreate = sceditor.create;
-	sceditor.create = function (textarea, options) {
-		oldCreate.call(this, textarea, options);
-
-		if (textarea && textarea._sceditor) {
-			var editor = textarea._sceditor;
-
-			editor.getBody = patchMethodReturn(editor.getBody);
-			editor.getContentAreaContainer =
-				patchMethodReturn(editor.getContentAreaContainer);
-		}
-	};
-}(sceditor, jQuery));

+ 0 - 548
public/style/sc/themes/defaultdark.css

@@ -1,548 +0,0 @@
-/*! SCEditor | (C) 2017, Sam Clarke | sceditor.com/license */
-/**
- * Default SCEditor
- * http://www.sceditor.com/
- *
- * Copyright (C) 2017, Sam Clarke
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- */
-div.sceditor-grip,
-.sceditor-button div {
-  background-image: url("famfamfam.png");
-  background-repeat: no-repeat;
-  width: 16px;
-  height: 16px;
-}
-.sceditor-button-youtube div {
-  background-position: 0px 0px;
-}
-.sceditor-button-link div {
-  background-position: 0px -16px;
-}
-.sceditor-button-unlink div {
-  background-position: 0px -32px;
-}
-.sceditor-button-underline div {
-  background-position: 0px -48px;
-}
-.sceditor-button-time div {
-  background-position: 0px -64px;
-}
-.sceditor-button-table div {
-  background-position: 0px -80px;
-}
-.sceditor-button-superscript div {
-  background-position: 0px -96px;
-}
-.sceditor-button-subscript div {
-  background-position: 0px -112px;
-}
-.sceditor-button-strike div {
-  background-position: 0px -128px;
-}
-.sceditor-button-source div {
-  background-position: 0px -144px;
-}
-.sceditor-button-size div {
-  background-position: 0px -160px;
-}
-.sceditor-button-rtl div {
-  background-position: 0px -176px;
-}
-.sceditor-button-right div {
-  background-position: 0px -192px;
-}
-.sceditor-button-removeformat div {
-  background-position: 0px -208px;
-}
-.sceditor-button-quote div {
-  background-position: 0px -224px;
-}
-.sceditor-button-print div {
-  background-position: 0px -240px;
-}
-.sceditor-button-pastetext div {
-  background-position: 0px -256px;
-}
-.sceditor-button-paste div {
-  background-position: 0px -272px;
-}
-.sceditor-button-outdent div {
-  background-position: 0px -288px;
-}
-.sceditor-button-orderedlist div {
-  background-position: 0px -304px;
-}
-.sceditor-button-maximize div {
-  background-position: 0px -320px;
-}
-.sceditor-button-ltr div {
-  background-position: 0px -336px;
-}
-.sceditor-button-left div {
-  background-position: 0px -352px;
-}
-.sceditor-button-justify div {
-  background-position: 0px -368px;
-}
-.sceditor-button-italic div {
-  background-position: 0px -384px;
-}
-.sceditor-button-indent div {
-  background-position: 0px -400px;
-}
-.sceditor-button-image div {
-  background-position: 0px -416px;
-}
-.sceditor-button-horizontalrule div {
-  background-position: 0px -432px;
-}
-.sceditor-button-format div {
-  background-position: 0px -448px;
-}
-.sceditor-button-font div {
-  background-position: 0px -464px;
-}
-.sceditor-button-emoticon div {
-  background-position: 0px -480px;
-}
-.sceditor-button-email div {
-  background-position: 0px -496px;
-}
-.sceditor-button-date div {
-  background-position: 0px -512px;
-}
-.sceditor-button-cut div {
-  background-position: 0px -528px;
-}
-.sceditor-button-copy div {
-  background-position: 0px -544px;
-}
-.sceditor-button-color div {
-  background-position: 0px -560px;
-}
-.sceditor-button-code div {
-  background-position: 0px -576px;
-}
-.sceditor-button-center div {
-  background-position: 0px -592px;
-}
-.sceditor-button-bulletlist div {
-  background-position: 0px -608px;
-}
-.sceditor-button-bold div {
-  background-position: 0px -624px;
-}
-div.sceditor-grip {
-  background-position: 0px -640px;
-  width: 10px;
-  height: 10px;
-}
-.rtl div.sceditor-grip {
-  background-position: 0px -650px;
-}
-/**
- * SCEditor
- * http://www.sceditor.com/
- *
- * Copyright (C) 2017, Sam Clarke (samclarke.com)
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- */
-/*---------------------------------------------------
-    LESS Elements 0.7
-  ---------------------------------------------------
-    A set of useful LESS mixins
-    More info at: http://lesselements.com
-  ---------------------------------------------------*/
-.sceditor-container {
-  display: -ms-flexbox;
-  display: flex;
-  -ms-flex-direction: column;
-  flex-direction: column;
-  position: relative;
-  background: #fff;
-  border: 1px solid #d9d9d9;
-  font-size: 13px;
-  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
-  color: #333;
-  line-height: 1;
-  font-weight: bold;
-  height: 250px;
-  border-radius: 4px;
-  background-clip: padding-box;
-}
-.sceditor-container *,
-.sceditor-container *:before,
-.sceditor-container *:after {
-  -webkit-box-sizing: content-box;
-  -moz-box-sizing: content-box;
-  box-sizing: content-box;
-}
-.sceditor-container,
-.sceditor-container div,
-div.sceditor-dropdown,
-div.sceditor-dropdown div {
-  padding: 0;
-  margin: 0;
-  z-index: 3;
-}
-.sceditor-container iframe,
-.sceditor-container textarea {
-  display: block;
-  -ms-flex: 1 1 0%;
-  flex: 1 1 0%;
-  line-height: 1.25;
-  border: 0;
-  outline: none;
-  font-family: Verdana, Arial, Helvetica, sans-serif;
-  font-size: 14px;
-  color: #111;
-  padding: 0;
-  margin: 5px;
-  resize: none;
-  background: #fff;
-  height: auto !important;
-  width: auto !important;
-  width: calc(100% - 10px) !important;
-  min-height: 1px;
-}
-.sceditor-container textarea {
-  margin: 7px 5px;
-}
-div.sceditor-dnd-cover {
-  position: absolute;
-  top: 0;
-  left: 0;
-  bottom: 0;
-  right: 0;
-  background: rgba(255, 255, 255, 0.2);
-  border: 5px dashed #aaa;
-  z-index: 200;
-  font-size: 2em;
-  text-align: center;
-  color: #aaa;
-}
-div.sceditor-dnd-cover p {
-  position: relative;
-  top: 45%;
-  pointer-events: none;
-}
-div.sceditor-resize-cover {
-  position: absolute;
-  top: 0;
-  left: 0;
-  background: #000;
-  width: 100%;
-  height: 100%;
-  z-index: 10;
-  opacity: 0.3;
-}
-div.sceditor-grip {
-  overflow: hidden;
-  width: 10px;
-  height: 10px;
-  cursor: pointer;
-  position: absolute;
-  bottom: 0;
-  right: 0;
-  z-index: 3;
-  line-height: 0;
-}
-div.sceditor-grip.has-icon {
-  background-image: none;
-}
-.sceditor-maximize {
-  position: fixed;
-  top: 0;
-  left: 0;
-  height: 100% !important;
-  width: 100% !important;
-  border-radius: 0;
-  background-clip: padding-box;
-  z-index: 2000;
-}
-html.sceditor-maximize,
-body.sceditor-maximize {
-  height: 100%;
-  width: 100%;
-  padding: 0;
-  margin: 0;
-  overflow: hidden;
-}
-.sceditor-maximize div.sceditor-grip {
-  display: none;
-}
-.sceditor-maximize div.sceditor-toolbar {
-  border-radius: 0;
-  background-clip: padding-box;
-}
-/**
-	 * Dropdown styleing
-	 */
-div.sceditor-dropdown {
-  position: absolute;
-  border: 1px solid #ccc;
-  background: #fff;
-  z-index: 4000;
-  padding: 10px;
-  font-weight: normal;
-  font-size: 15px;
-  border-radius: 2px;
-  background-clip: padding-box;
-  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.2);
-}
-div.sceditor-dropdown *,
-div.sceditor-dropdown *:before,
-div.sceditor-dropdown *:after {
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-div.sceditor-dropdown a,
-div.sceditor-dropdown a:link {
-  color: #333;
-}
-div.sceditor-dropdown form {
-  margin: 0;
-}
-div.sceditor-dropdown label {
-  display: block;
-  font-weight: bold;
-  color: #3c3c3c;
-  padding: 4px 0;
-}
-div.sceditor-dropdown input,
-div.sceditor-dropdown textarea {
-  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
-  outline: 0;
-  padding: 4px;
-  border: 1px solid #ccc;
-  border-top-color: #888;
-  margin: 0 0 0.75em;
-  border-radius: 1px;
-  background-clip: padding-box;
-}
-div.sceditor-dropdown textarea {
-  padding: 6px;
-}
-div.sceditor-dropdown input:focus,
-div.sceditor-dropdown textarea:focus {
-  border-color: #aaa;
-  border-top-color: #666;
-  box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.1);
-}
-div.sceditor-dropdown .button {
-  font-weight: bold;
-  color: #444;
-  padding: 6px 12px;
-  background: #ececec;
-  border: solid 1px #ccc;
-  border-radius: 2px;
-  background-clip: padding-box;
-  cursor: pointer;
-  margin: 0.3em 0 0;
-}
-div.sceditor-dropdown .button:hover {
-  background: #f3f3f3;
-  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
-}
-div.sceditor-font-picker,
-div.sceditor-fontsize-picker,
-div.sceditor-format {
-  padding: 6px 0;
-}
-div.sceditor-color-picker {
-  padding: 4px;
-}
-div.sceditor-emoticons,
-div.sceditor-more-emoticons {
-  padding: 0;
-}
-.sceditor-pastetext textarea {
-  border: 1px solid #bbb;
-  width: 20em;
-}
-.sceditor-emoticons img,
-.sceditor-more-emoticons img {
-  padding: 0;
-  cursor: pointer;
-  margin: 2px;
-}
-.sceditor-more {
-  border-top: 1px solid #bbb;
-  display: block;
-  text-align: center;
-  cursor: pointer;
-  font-weight: bold;
-  padding: 6px 0;
-}
-.sceditor-dropdown a:hover {
-  background: #eee;
-}
-.sceditor-fontsize-option,
-.sceditor-font-option,
-.sceditor-format a {
-  display: block;
-  padding: 7px 10px;
-  cursor: pointer;
-  text-decoration: none;
-  color: #222;
-}
-.sceditor-fontsize-option {
-  padding: 7px 13px;
-}
-.sceditor-color-column {
-  float: left;
-}
-.sceditor-color-option {
-  display: block;
-  border: 2px solid #fff;
-  height: 18px;
-  width: 18px;
-  overflow: hidden;
-}
-.sceditor-color-option:hover {
-  border: 1px solid #aaa;
-}
-/**
-	 * Toolbar styleing
-	 */
-div.sceditor-toolbar {
-  flex-shrink: 0;
-  overflow: hidden;
-  padding: 3px 5px 2px;
-  background: #f7f7f7;
-  border-bottom: 1px solid #c0c0c0;
-  line-height: 0;
-  text-align: left;
-  user-select: none;
-  border-radius: 3px 3px 0 0;
-  background-clip: padding-box;
-}
-div.sceditor-group {
-  display: inline-block;
-  background: #ddd;
-  margin: 1px 5px 1px 0;
-  padding: 1px;
-  border-bottom: 1px solid #aaa;
-  border-radius: 3px;
-  background-clip: padding-box;
-}
-.sceditor-button {
-  float: left;
-  cursor: pointer;
-  padding: 3px 5px;
-  width: 16px;
-  height: 20px;
-  border-radius: 3px;
-  background-clip: padding-box;
-}
-.sceditor-button:hover,
-.sceditor-button:active,
-.sceditor-button.active {
-  background: #fff;
-  box-shadow: inset 1px 1px 0 rgba(0,0,0,0.3), inset -1px 0 rgba(0,0,0,0.3), inset 0 -1px 0 rgba(0,0,0,0.2);
-}
-.sceditor-button:active {
-  background: #fff;
-  box-shadow: inset 1px 1px 0 rgba(0,0,0,0.3), inset -1px 0 rgba(0,0,0,0.3), inset 0 -1px 0 rgba(0,0,0,0.2), inset 0 0 8px rgba(0,0,0,0.3);
-}
-.sceditor-button.disabled:hover {
-  background: inherit;
-  cursor: default;
-  box-shadow: none;
-}
-.sceditor-button,
-.sceditor-button div {
-  display: block;
-}
-.sceditor-button svg {
-  display: inline-block;
-  height: 16px;
-  width: 16px;
-  margin: 2px 0;
-  fill: #111;
-  text-decoration: none;
-  pointer-events: none;
-  line-height: 1;
-}
-.sceditor-button.disabled svg {
-  fill: #888;
-}
-.sceditor-button div {
-  display: inline-block;
-  margin: 2px 0;
-  padding: 0;
-  overflow: hidden;
-  line-height: 0;
-  font-size: 0;
-  color: transparent;
-}
-.sceditor-button.has-icon div {
-  display: none;
-}
-.sceditor-button.disabled div {
-  opacity: 0.3;
-}
-.text .sceditor-button,
-.text .sceditor-button div,
-.sceditor-button.text,
-.sceditor-button.text div,
-.text-icon .sceditor-button,
-.text-icon .sceditor-button div,
-.sceditor-button.text-icon,
-.sceditor-button.text-icon div {
-  display: inline-block;
-  width: auto;
-  line-height: 16px;
-  font-size: 1em;
-  color: inherit;
-  text-indent: 0;
-}
-.text-icon .sceditor-button.has-icon div,
-.sceditor-button.has-icon div,
-.text .sceditor-button div,
-.sceditor-button.text div {
-  padding: 0 2px;
-  background: none;
-}
-.text .sceditor-button svg,
-.sceditor-button.text svg {
-  display: none;
-}
-.text-icon .sceditor-button div,
-.sceditor-button.text-icon div {
-  padding: 0 2px 0 20px;
-}
-.rtl div.sceditor-toolbar {
-  text-align: right;
-}
-.rtl .sceditor-button {
-  float: right;
-}
-.rtl div.sceditor-grip {
-  right: auto;
-  left: 0;
-}
-div.sceditor-toolbar {
-  background: #5d5d5d;
-}
-div.sceditor-group {
-  background: #303030;
-  border-bottom: 1px solid #000;
-}
-.sceditor-button:hover,
-.sceditor-button:active,
-.sceditor-button.active {
-  background: #6b6b6b;
-}
-.sceditor-button svg {
-  fill: #fff;
-}
-.sceditor-button.disabled svg {
-  fill: #777;
-}

+ 0 - 604
public/style/sc/themes/modern.css

@@ -1,604 +0,0 @@
-/**
- * Modern theme
- *
- * Copyright (C) 2012, Sam Clarke (samclarke.com)
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- *
- * Icons by Mark James (http://www.famfamfam.com/lab/icons/silk/)
- * Licensed under the Creative Commons CC-BY license (http://creativecommons.org/licenses/by/3.0/)
- */
-/*! SCEditor | (C) 2011-2016, Sam Clarke | sceditor.com/license */
-/**
- * Default SCEditor
- * http://www.sceditor.com/
- *
- * Copyright (C) 2011-16, Sam Clarke
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- */
-div.sceditor-grip,
-.sceditor-button div {
-  background-image: url("famfamfam.png");
-  background-repeat: no-repeat;
-  width: 16px;
-  height: 16px;
-}
-.sceditor-button-youtube div {
-  background-position: 0px 0px;
-}
-.sceditor-button-link div {
-  background-position: 0px -16px;
-}
-.sceditor-button-unlink div {
-  background-position: 0px -32px;
-}
-.sceditor-button-underline div {
-  background-position: 0px -48px;
-}
-.sceditor-button-time div {
-  background-position: 0px -64px;
-}
-.sceditor-button-table div {
-  background-position: 0px -80px;
-}
-.sceditor-button-superscript div {
-  background-position: 0px -96px;
-}
-.sceditor-button-subscript div {
-  background-position: 0px -112px;
-}
-.sceditor-button-strike div {
-  background-position: 0px -128px;
-}
-.sceditor-button-source div {
-  background-position: 0px -144px;
-}
-.sceditor-button-size div {
-  background-position: 0px -160px;
-}
-.sceditor-button-rtl div {
-  background-position: 0px -176px;
-}
-.sceditor-button-right div {
-  background-position: 0px -192px;
-}
-.sceditor-button-removeformat div {
-  background-position: 0px -208px;
-}
-.sceditor-button-quote div {
-  background-position: 0px -224px;
-}
-.sceditor-button-print div {
-  background-position: 0px -240px;
-}
-.sceditor-button-pastetext div {
-  background-position: 0px -256px;
-}
-.sceditor-button-paste div {
-  background-position: 0px -272px;
-}
-.sceditor-button-outdent div {
-  background-position: 0px -288px;
-}
-.sceditor-button-orderedlist div {
-  background-position: 0px -304px;
-}
-.sceditor-button-maximize div {
-  background-position: 0px -320px;
-}
-.sceditor-button-ltr div {
-  background-position: 0px -336px;
-}
-.sceditor-button-left div {
-  background-position: 0px -352px;
-}
-.sceditor-button-justify div {
-  background-position: 0px -368px;
-}
-.sceditor-button-italic div {
-  background-position: 0px -384px;
-}
-.sceditor-button-indent div {
-  background-position: 0px -400px;
-}
-.sceditor-button-image div {
-  background-position: 0px -416px;
-}
-.sceditor-button-horizontalrule div {
-  background-position: 0px -432px;
-}
-.sceditor-button-format div {
-  background-position: 0px -448px;
-}
-.sceditor-button-font div {
-  background-position: 0px -464px;
-}
-.sceditor-button-emoticon div {
-  background-position: 0px -480px;
-}
-.sceditor-button-email div {
-  background-position: 0px -496px;
-}
-.sceditor-button-date div {
-  background-position: 0px -512px;
-}
-.sceditor-button-cut div {
-  background-position: 0px -528px;
-}
-.sceditor-button-copy div {
-  background-position: 0px -544px;
-}
-.sceditor-button-color div {
-  background-position: 0px -560px;
-}
-.sceditor-button-code div {
-  background-position: 0px -576px;
-}
-.sceditor-button-center div {
-  background-position: 0px -592px;
-}
-.sceditor-button-bulletlist div {
-  background-position: 0px -608px;
-}
-.sceditor-button-bold div {
-  background-position: 0px -624px;
-}
-div.sceditor-grip {
-  background-position: 0px -640px;
-  width: 10px;
-  height: 10px;
-}
-.rtl div.sceditor-grip {
-  background-position: 0px -650px;
-}
-/**
- * SCEditor
- * http://www.sceditor.com/
- *
- * Copyright (C) 2017, Sam Clarke (samclarke.com)
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- */
-/*---------------------------------------------------
-    LESS Elements 0.7
-  ---------------------------------------------------
-    A set of useful LESS mixins
-    More info at: http://lesselements.com
-  ---------------------------------------------------*/
-.sceditor-container {
-  display: -ms-flexbox;
-  display: flex;
-  -ms-flex-direction: column;
-  flex-direction: column;
-  position: relative;
-  background: #fff;
-  border: 1px solid #d9d9d9;
-  font-size: 13px;
-  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
-  color: #333;
-  line-height: 1;
-  font-weight: bold;
-  height: 250px;
-  border-radius: 4px;
-  background-clip: padding-box;
-}
-.sceditor-container *,
-.sceditor-container *:before,
-.sceditor-container *:after {
-  -webkit-box-sizing: content-box;
-  -moz-box-sizing: content-box;
-  box-sizing: content-box;
-}
-.sceditor-container,
-.sceditor-container div,
-div.sceditor-dropdown,
-div.sceditor-dropdown div {
-  padding: 0;
-  margin: 0;
-  z-index: 3;
-}
-.sceditor-container iframe,
-.sceditor-container textarea {
-  display: block;
-  -ms-flex: 1 1 0%;
-  flex: 1 1 0%;
-  line-height: 1.25;
-  border: 0;
-  outline: none;
-  font-family: Verdana, Arial, Helvetica, sans-serif;
-  font-size: 14px;
-  color: #111;
-  padding: 0;
-  margin: 5px;
-  resize: none;
-  background: #fff;
-  height: auto !important;
-  width: auto !important;
-  width: calc(100% - 10px) !important;
-  min-height: 1px;
-}
-.sceditor-container textarea {
-  margin: 7px 5px;
-}
-div.sceditor-dnd-cover {
-  position: absolute;
-  top: 0;
-  left: 0;
-  bottom: 0;
-  right: 0;
-  background: rgba(255, 255, 255, 0.2);
-  border: 5px dashed #aaa;
-  z-index: 200;
-  font-size: 2em;
-  text-align: center;
-  color: #aaa;
-}
-div.sceditor-dnd-cover p {
-  position: relative;
-  top: 45%;
-  pointer-events: none;
-}
-div.sceditor-resize-cover {
-  position: absolute;
-  top: 0;
-  left: 0;
-  background: #000;
-  width: 100%;
-  height: 100%;
-  z-index: 10;
-  opacity: 0.3;
-}
-div.sceditor-grip {
-  overflow: hidden;
-  width: 10px;
-  height: 10px;
-  cursor: pointer;
-  position: absolute;
-  bottom: 0;
-  right: 0;
-  z-index: 3;
-  line-height: 0;
-}
-div.sceditor-grip.has-icon {
-  background-image: none;
-}
-.sceditor-maximize {
-  position: fixed;
-  top: 0;
-  left: 0;
-  height: 100% !important;
-  width: 100% !important;
-  border-radius: 0;
-  background-clip: padding-box;
-  z-index: 2000;
-}
-html.sceditor-maximize,
-body.sceditor-maximize {
-  height: 100%;
-  width: 100%;
-  padding: 0;
-  margin: 0;
-  overflow: hidden;
-}
-.sceditor-maximize div.sceditor-grip {
-  display: none;
-}
-.sceditor-maximize div.sceditor-toolbar {
-  border-radius: 0;
-  background-clip: padding-box;
-}
-/**
-	 * Dropdown styleing
-	 */
-div.sceditor-dropdown {
-  position: absolute;
-  border: 1px solid #ccc;
-  background: #fff;
-  z-index: 4000;
-  padding: 10px;
-  font-weight: normal;
-  font-size: 15px;
-  border-radius: 2px;
-  background-clip: padding-box;
-  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.2);
-}
-div.sceditor-dropdown *,
-div.sceditor-dropdown *:before,
-div.sceditor-dropdown *:after {
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-div.sceditor-dropdown a,
-div.sceditor-dropdown a:link {
-  color: #333;
-}
-div.sceditor-dropdown form {
-  margin: 0;
-}
-div.sceditor-dropdown label {
-  display: block;
-  font-weight: bold;
-  color: #3c3c3c;
-  padding: 4px 0;
-}
-div.sceditor-dropdown input,
-div.sceditor-dropdown textarea {
-  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
-  outline: 0;
-  padding: 4px;
-  border: 1px solid #ccc;
-  border-top-color: #888;
-  margin: 0 0 0.75em;
-  border-radius: 1px;
-  background-clip: padding-box;
-}
-div.sceditor-dropdown textarea {
-  padding: 6px;
-}
-div.sceditor-dropdown input:focus,
-div.sceditor-dropdown textarea:focus {
-  border-color: #aaa;
-  border-top-color: #666;
-  box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.1);
-}
-div.sceditor-dropdown .button {
-  font-weight: bold;
-  color: #444;
-  padding: 6px 12px;
-  background: #ececec;
-  border: solid 1px #ccc;
-  border-radius: 2px;
-  background-clip: padding-box;
-  cursor: pointer;
-  margin: 0.3em 0 0;
-}
-div.sceditor-dropdown .button:hover {
-  background: #f3f3f3;
-  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
-}
-div.sceditor-font-picker,
-div.sceditor-fontsize-picker,
-div.sceditor-format {
-  padding: 6px 0;
-}
-div.sceditor-color-picker {
-  padding: 4px;
-}
-div.sceditor-emoticons,
-div.sceditor-more-emoticons {
-  padding: 0;
-}
-.sceditor-pastetext textarea {
-  border: 1px solid #bbb;
-  width: 20em;
-}
-.sceditor-emoticons img,
-.sceditor-more-emoticons img {
-  padding: 0;
-  cursor: pointer;
-  margin: 2px;
-}
-.sceditor-more {
-  border-top: 1px solid #bbb;
-  display: block;
-  text-align: center;
-  cursor: pointer;
-  font-weight: bold;
-  padding: 6px 0;
-}
-.sceditor-dropdown a:hover {
-  background: #eee;
-}
-.sceditor-fontsize-option,
-.sceditor-font-option,
-.sceditor-format a {
-  display: block;
-  padding: 7px 10px;
-  cursor: pointer;
-  text-decoration: none;
-  color: #222;
-}
-.sceditor-fontsize-option {
-  padding: 7px 13px;
-}
-.sceditor-color-column {
-  float: left;
-}
-.sceditor-color-option {
-  display: block;
-  border: 2px solid #fff;
-  height: 18px;
-  width: 18px;
-  overflow: hidden;
-}
-.sceditor-color-option:hover {
-  border: 1px solid #aaa;
-}
-/**
-	 * Toolbar styleing
-	 */
-div.sceditor-toolbar {
-  flex-shrink: 0;
-  overflow: hidden;
-  padding: 3px 5px 2px;
-  background: #f7f7f7;
-  border-bottom: 1px solid #c0c0c0;
-  line-height: 0;
-  text-align: left;
-  user-select: none;
-  border-radius: 3px 3px 0 0;
-  background-clip: padding-box;
-}
-div.sceditor-group {
-  display: inline-block;
-  background: #ddd;
-  margin: 1px 5px 1px 0;
-  padding: 1px;
-  border-bottom: 1px solid #aaa;
-  border-radius: 3px;
-  background-clip: padding-box;
-}
-.sceditor-button {
-  float: left;
-  cursor: pointer;
-  padding: 3px 5px;
-  width: 16px;
-  height: 20px;
-  border-radius: 3px;
-  background-clip: padding-box;
-}
-.sceditor-button:hover,
-.sceditor-button:active,
-.sceditor-button.active {
-  background: #fff;
-  box-shadow: inset 1px 1px 0 rgba(0,0,0,0.3), inset -1px 0 rgba(0,0,0,0.3), inset 0 -1px 0 rgba(0,0,0,0.2);
-}
-.sceditor-button:active {
-  background: #fff;
-  box-shadow: inset 1px 1px 0 rgba(0,0,0,0.3), inset -1px 0 rgba(0,0,0,0.3), inset 0 -1px 0 rgba(0,0,0,0.2), inset 0 0 8px rgba(0,0,0,0.3);
-}
-.sceditor-button.disabled:hover {
-  background: inherit;
-  cursor: default;
-  box-shadow: none;
-}
-.sceditor-button,
-.sceditor-button div {
-  display: block;
-}
-.sceditor-button svg {
-  display: inline-block;
-  height: 16px;
-  width: 16px;
-  margin: 2px 0;
-  fill: #111;
-  text-decoration: none;
-  pointer-events: none;
-  line-height: 1;
-}
-.sceditor-button.disabled svg {
-  fill: #888;
-}
-.sceditor-button div {
-  display: inline-block;
-  margin: 2px 0;
-  padding: 0;
-  overflow: hidden;
-  line-height: 0;
-  font-size: 0;
-  color: transparent;
-}
-.sceditor-button.has-icon div {
-  display: none;
-}
-.sceditor-button.disabled div {
-  opacity: 0.3;
-}
-.text .sceditor-button,
-.text .sceditor-button div,
-.sceditor-button.text,
-.sceditor-button.text div,
-.text-icon .sceditor-button,
-.text-icon .sceditor-button div,
-.sceditor-button.text-icon,
-.sceditor-button.text-icon div {
-  display: inline-block;
-  width: auto;
-  line-height: 16px;
-  font-size: 1em;
-  color: inherit;
-  text-indent: 0;
-}
-.text-icon .sceditor-button.has-icon div,
-.sceditor-button.has-icon div,
-.text .sceditor-button div,
-.sceditor-button.text div {
-  padding: 0 2px;
-  background: none;
-}
-.text .sceditor-button svg,
-.sceditor-button.text svg {
-  display: none;
-}
-.text-icon .sceditor-button div,
-.sceditor-button.text-icon div {
-  padding: 0 2px 0 20px;
-}
-.rtl div.sceditor-toolbar {
-  text-align: right;
-}
-.rtl .sceditor-button {
-  float: right;
-}
-.rtl div.sceditor-grip {
-  right: auto;
-  left: 0;
-}
-.sceditor-container {
-  border: 1px solid #999;
-}
-.sceditor-container textarea {
-  font-family: Consolas, "Bitstream Vera Sans Mono", "Andale Mono", Monaco, "DejaVu Sans Mono", "Lucida Console", monospace;
-  background: #2e3436;
-  color: #fff;
-  margin: 0;
-  padding: 5px;
-}
-div.sceditor-toolbar {
-  background: #ccc;
-  background: linear-gradient(to bottom, #cccccc 0%, #b2b2b2 100%);
-}
-div.sceditor-group {
-  display: inline;
-  background: transparent;
-  margin: 0;
-  padding: 0;
-  border: 0;
-}
-.sceditor-button {
-  padding: 4px;
-  margin: 2px 1px 2px 3px;
-  height: 16px;
-  border-radius: 12px;
-  background-clip: padding-box;
-}
-.sceditor-button:hover,
-.sceditor-button.active,
-.sceditor-button.active:hover {
-  box-shadow: none;
-}
-.sceditor-button:hover {
-  background: #fff;
-  background: rgba(255, 255, 255, 0.75);
-  margin: 1px 0 1px 2px;
-  border: 1px solid #eee;
-}
-.sceditor-button.disabled:hover {
-  margin: 2px 1px 2px 3px;
-  border: 0;
-}
-.sceditor-button.active {
-  background: #b1b1b1;
-  background: rgba(0, 0, 0, 0.1);
-  margin: 1px 0 1px 2px;
-  border: 1px solid #999;
-}
-.sceditor-button.active:hover {
-  background: #fff;
-  background: rgba(255, 255, 255, 0.25);
-}
-.sceditor-button:active,
-.sceditor-button.active:active {
-  margin: 1px 0 1px 2px;
-  border: 1px solid #999;
-  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.5);
-}
-.sceditor-button div,
-.sceditor-button svg {
-  margin: 0;
-}

+ 0 - 596
public/style/sc/themes/office-toolbar.css

@@ -1,596 +0,0 @@
-/**
- * Copyright (C) 2012, Sam Clarke (samclarke.com)
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- *
- * Icons by Mark James (http://www.famfamfam.com/lab/icons/silk/)
- * Licensed under the Creative Commons CC-BY license (http://creativecommons.org/licenses/by/3.0/)
- */
-/*! SCEditor | (C) 2011-2016, Sam Clarke | sceditor.com/license */
-/**
- * Default SCEditor
- * http://www.sceditor.com/
- *
- * Copyright (C) 2011-16, Sam Clarke
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- */
-div.sceditor-grip,
-.sceditor-button div {
-  background-image: url("famfamfam.png");
-  background-repeat: no-repeat;
-  width: 16px;
-  height: 16px;
-}
-.sceditor-button-youtube div {
-  background-position: 0px 0px;
-}
-.sceditor-button-link div {
-  background-position: 0px -16px;
-}
-.sceditor-button-unlink div {
-  background-position: 0px -32px;
-}
-.sceditor-button-underline div {
-  background-position: 0px -48px;
-}
-.sceditor-button-time div {
-  background-position: 0px -64px;
-}
-.sceditor-button-table div {
-  background-position: 0px -80px;
-}
-.sceditor-button-superscript div {
-  background-position: 0px -96px;
-}
-.sceditor-button-subscript div {
-  background-position: 0px -112px;
-}
-.sceditor-button-strike div {
-  background-position: 0px -128px;
-}
-.sceditor-button-source div {
-  background-position: 0px -144px;
-}
-.sceditor-button-size div {
-  background-position: 0px -160px;
-}
-.sceditor-button-rtl div {
-  background-position: 0px -176px;
-}
-.sceditor-button-right div {
-  background-position: 0px -192px;
-}
-.sceditor-button-removeformat div {
-  background-position: 0px -208px;
-}
-.sceditor-button-quote div {
-  background-position: 0px -224px;
-}
-.sceditor-button-print div {
-  background-position: 0px -240px;
-}
-.sceditor-button-pastetext div {
-  background-position: 0px -256px;
-}
-.sceditor-button-paste div {
-  background-position: 0px -272px;
-}
-.sceditor-button-outdent div {
-  background-position: 0px -288px;
-}
-.sceditor-button-orderedlist div {
-  background-position: 0px -304px;
-}
-.sceditor-button-maximize div {
-  background-position: 0px -320px;
-}
-.sceditor-button-ltr div {
-  background-position: 0px -336px;
-}
-.sceditor-button-left div {
-  background-position: 0px -352px;
-}
-.sceditor-button-justify div {
-  background-position: 0px -368px;
-}
-.sceditor-button-italic div {
-  background-position: 0px -384px;
-}
-.sceditor-button-indent div {
-  background-position: 0px -400px;
-}
-.sceditor-button-image div {
-  background-position: 0px -416px;
-}
-.sceditor-button-horizontalrule div {
-  background-position: 0px -432px;
-}
-.sceditor-button-format div {
-  background-position: 0px -448px;
-}
-.sceditor-button-font div {
-  background-position: 0px -464px;
-}
-.sceditor-button-emoticon div {
-  background-position: 0px -480px;
-}
-.sceditor-button-email div {
-  background-position: 0px -496px;
-}
-.sceditor-button-date div {
-  background-position: 0px -512px;
-}
-.sceditor-button-cut div {
-  background-position: 0px -528px;
-}
-.sceditor-button-copy div {
-  background-position: 0px -544px;
-}
-.sceditor-button-color div {
-  background-position: 0px -560px;
-}
-.sceditor-button-code div {
-  background-position: 0px -576px;
-}
-.sceditor-button-center div {
-  background-position: 0px -592px;
-}
-.sceditor-button-bulletlist div {
-  background-position: 0px -608px;
-}
-.sceditor-button-bold div {
-  background-position: 0px -624px;
-}
-div.sceditor-grip {
-  background-position: 0px -640px;
-  width: 10px;
-  height: 10px;
-}
-.rtl div.sceditor-grip {
-  background-position: 0px -650px;
-}
-/**
- * SCEditor
- * http://www.sceditor.com/
- *
- * Copyright (C) 2017, Sam Clarke (samclarke.com)
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- */
-/*---------------------------------------------------
-    LESS Elements 0.7
-  ---------------------------------------------------
-    A set of useful LESS mixins
-    More info at: http://lesselements.com
-  ---------------------------------------------------*/
-.sceditor-container {
-  display: -ms-flexbox;
-  display: flex;
-  -ms-flex-direction: column;
-  flex-direction: column;
-  position: relative;
-  background: #fff;
-  border: 1px solid #d9d9d9;
-  font-size: 13px;
-  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
-  color: #333;
-  line-height: 1;
-  font-weight: bold;
-  height: 250px;
-  border-radius: 4px;
-  background-clip: padding-box;
-}
-.sceditor-container *,
-.sceditor-container *:before,
-.sceditor-container *:after {
-  -webkit-box-sizing: content-box;
-  -moz-box-sizing: content-box;
-  box-sizing: content-box;
-}
-.sceditor-container,
-.sceditor-container div,
-div.sceditor-dropdown,
-div.sceditor-dropdown div {
-  padding: 0;
-  margin: 0;
-  z-index: 3;
-}
-.sceditor-container iframe,
-.sceditor-container textarea {
-  display: block;
-  -ms-flex: 1 1 0%;
-  flex: 1 1 0%;
-  line-height: 1.25;
-  border: 0;
-  outline: none;
-  font-family: Verdana, Arial, Helvetica, sans-serif;
-  font-size: 14px;
-  color: #111;
-  padding: 0;
-  margin: 5px;
-  resize: none;
-  background: #fff;
-  height: auto !important;
-  width: auto !important;
-  width: calc(100% - 10px) !important;
-  min-height: 1px;
-}
-.sceditor-container textarea {
-  margin: 7px 5px;
-}
-div.sceditor-dnd-cover {
-  position: absolute;
-  top: 0;
-  left: 0;
-  bottom: 0;
-  right: 0;
-  background: rgba(255, 255, 255, 0.2);
-  border: 5px dashed #aaa;
-  z-index: 200;
-  font-size: 2em;
-  text-align: center;
-  color: #aaa;
-}
-div.sceditor-dnd-cover p {
-  position: relative;
-  top: 45%;
-  pointer-events: none;
-}
-div.sceditor-resize-cover {
-  position: absolute;
-  top: 0;
-  left: 0;
-  background: #000;
-  width: 100%;
-  height: 100%;
-  z-index: 10;
-  opacity: 0.3;
-}
-div.sceditor-grip {
-  overflow: hidden;
-  width: 10px;
-  height: 10px;
-  cursor: pointer;
-  position: absolute;
-  bottom: 0;
-  right: 0;
-  z-index: 3;
-  line-height: 0;
-}
-div.sceditor-grip.has-icon {
-  background-image: none;
-}
-.sceditor-maximize {
-  position: fixed;
-  top: 0;
-  left: 0;
-  height: 100% !important;
-  width: 100% !important;
-  border-radius: 0;
-  background-clip: padding-box;
-  z-index: 2000;
-}
-html.sceditor-maximize,
-body.sceditor-maximize {
-  height: 100%;
-  width: 100%;
-  padding: 0;
-  margin: 0;
-  overflow: hidden;
-}
-.sceditor-maximize div.sceditor-grip {
-  display: none;
-}
-.sceditor-maximize div.sceditor-toolbar {
-  border-radius: 0;
-  background-clip: padding-box;
-}
-/**
-	 * Dropdown styleing
-	 */
-div.sceditor-dropdown {
-  position: absolute;
-  border: 1px solid #ccc;
-  background: #fff;
-  z-index: 4000;
-  padding: 10px;
-  font-weight: normal;
-  font-size: 15px;
-  border-radius: 2px;
-  background-clip: padding-box;
-  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.2);
-}
-div.sceditor-dropdown *,
-div.sceditor-dropdown *:before,
-div.sceditor-dropdown *:after {
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-div.sceditor-dropdown a,
-div.sceditor-dropdown a:link {
-  color: #333;
-}
-div.sceditor-dropdown form {
-  margin: 0;
-}
-div.sceditor-dropdown label {
-  display: block;
-  font-weight: bold;
-  color: #3c3c3c;
-  padding: 4px 0;
-}
-div.sceditor-dropdown input,
-div.sceditor-dropdown textarea {
-  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
-  outline: 0;
-  padding: 4px;
-  border: 1px solid #ccc;
-  border-top-color: #888;
-  margin: 0 0 0.75em;
-  border-radius: 1px;
-  background-clip: padding-box;
-}
-div.sceditor-dropdown textarea {
-  padding: 6px;
-}
-div.sceditor-dropdown input:focus,
-div.sceditor-dropdown textarea:focus {
-  border-color: #aaa;
-  border-top-color: #666;
-  box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.1);
-}
-div.sceditor-dropdown .button {
-  font-weight: bold;
-  color: #444;
-  padding: 6px 12px;
-  background: #ececec;
-  border: solid 1px #ccc;
-  border-radius: 2px;
-  background-clip: padding-box;
-  cursor: pointer;
-  margin: 0.3em 0 0;
-}
-div.sceditor-dropdown .button:hover {
-  background: #f3f3f3;
-  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
-}
-div.sceditor-font-picker,
-div.sceditor-fontsize-picker,
-div.sceditor-format {
-  padding: 6px 0;
-}
-div.sceditor-color-picker {
-  padding: 4px;
-}
-div.sceditor-emoticons,
-div.sceditor-more-emoticons {
-  padding: 0;
-}
-.sceditor-pastetext textarea {
-  border: 1px solid #bbb;
-  width: 20em;
-}
-.sceditor-emoticons img,
-.sceditor-more-emoticons img {
-  padding: 0;
-  cursor: pointer;
-  margin: 2px;
-}
-.sceditor-more {
-  border-top: 1px solid #bbb;
-  display: block;
-  text-align: center;
-  cursor: pointer;
-  font-weight: bold;
-  padding: 6px 0;
-}
-.sceditor-dropdown a:hover {
-  background: #eee;
-}
-.sceditor-fontsize-option,
-.sceditor-font-option,
-.sceditor-format a {
-  display: block;
-  padding: 7px 10px;
-  cursor: pointer;
-  text-decoration: none;
-  color: #222;
-}
-.sceditor-fontsize-option {
-  padding: 7px 13px;
-}
-.sceditor-color-column {
-  float: left;
-}
-.sceditor-color-option {
-  display: block;
-  border: 2px solid #fff;
-  height: 18px;
-  width: 18px;
-  overflow: hidden;
-}
-.sceditor-color-option:hover {
-  border: 1px solid #aaa;
-}
-/**
-	 * Toolbar styleing
-	 */
-div.sceditor-toolbar {
-  flex-shrink: 0;
-  overflow: hidden;
-  padding: 3px 5px 2px;
-  background: #f7f7f7;
-  border-bottom: 1px solid #c0c0c0;
-  line-height: 0;
-  text-align: left;
-  user-select: none;
-  border-radius: 3px 3px 0 0;
-  background-clip: padding-box;
-}
-div.sceditor-group {
-  display: inline-block;
-  background: #ddd;
-  margin: 1px 5px 1px 0;
-  padding: 1px;
-  border-bottom: 1px solid #aaa;
-  border-radius: 3px;
-  background-clip: padding-box;
-}
-.sceditor-button {
-  float: left;
-  cursor: pointer;
-  padding: 3px 5px;
-  width: 16px;
-  height: 20px;
-  border-radius: 3px;
-  background-clip: padding-box;
-}
-.sceditor-button:hover,
-.sceditor-button:active,
-.sceditor-button.active {
-  background: #fff;
-  box-shadow: inset 1px 1px 0 rgba(0,0,0,0.3), inset -1px 0 rgba(0,0,0,0.3), inset 0 -1px 0 rgba(0,0,0,0.2);
-}
-.sceditor-button:active {
-  background: #fff;
-  box-shadow: inset 1px 1px 0 rgba(0,0,0,0.3), inset -1px 0 rgba(0,0,0,0.3), inset 0 -1px 0 rgba(0,0,0,0.2), inset 0 0 8px rgba(0,0,0,0.3);
-}
-.sceditor-button.disabled:hover {
-  background: inherit;
-  cursor: default;
-  box-shadow: none;
-}
-.sceditor-button,
-.sceditor-button div {
-  display: block;
-}
-.sceditor-button svg {
-  display: inline-block;
-  height: 16px;
-  width: 16px;
-  margin: 2px 0;
-  fill: #111;
-  text-decoration: none;
-  pointer-events: none;
-  line-height: 1;
-}
-.sceditor-button.disabled svg {
-  fill: #888;
-}
-.sceditor-button div {
-  display: inline-block;
-  margin: 2px 0;
-  padding: 0;
-  overflow: hidden;
-  line-height: 0;
-  font-size: 0;
-  color: transparent;
-}
-.sceditor-button.has-icon div {
-  display: none;
-}
-.sceditor-button.disabled div {
-  opacity: 0.3;
-}
-.text .sceditor-button,
-.text .sceditor-button div,
-.sceditor-button.text,
-.sceditor-button.text div,
-.text-icon .sceditor-button,
-.text-icon .sceditor-button div,
-.sceditor-button.text-icon,
-.sceditor-button.text-icon div {
-  display: inline-block;
-  width: auto;
-  line-height: 16px;
-  font-size: 1em;
-  color: inherit;
-  text-indent: 0;
-}
-.text-icon .sceditor-button.has-icon div,
-.sceditor-button.has-icon div,
-.text .sceditor-button div,
-.sceditor-button.text div {
-  padding: 0 2px;
-  background: none;
-}
-.text .sceditor-button svg,
-.sceditor-button.text svg {
-  display: none;
-}
-.text-icon .sceditor-button div,
-.sceditor-button.text-icon div {
-  padding: 0 2px 0 20px;
-}
-.rtl div.sceditor-toolbar {
-  text-align: right;
-}
-.rtl .sceditor-button {
-  float: right;
-}
-.rtl div.sceditor-grip {
-  right: auto;
-  left: 0;
-}
-.sceditor-container {
-  border: 1px solid #8db2e3;
-}
-.sceditor-container textarea {
-  font-family: Consolas, "Bitstream Vera Sans Mono", "Andale Mono", Monaco, "DejaVu Sans Mono", "Lucida Console", monospace;
-}
-div.sceditor-toolbar {
-  border-bottom: 1px solid #95a9c3;
-  background: #dee8f5;
-  background: linear-gradient(to bottom, #dee8f5 0%, #c7d8ed 29%, #ccdcee 61%, #c0d8ef 100%);
-}
-div.sceditor-group {
-  border: 1px solid #7596bf;
-  background: transparent;
-  padding: 0;
-  background: #cadcf0;
-  background: linear-gradient(to bottom, #cadcf0 24%, #bcd0e9 38%, #d0e1f7 99%);
-}
-.sceditor-button {
-  height: 16px;
-  padding: 3px 4px;
-  border-radius: 0;
-  background-clip: padding-box;
-  box-shadow: inset 0 1px #d5e3f1, inset 0 -1px #e3edfb, inset 1px 0 #cddcef, inset -1px 0 #b8ceea;
-}
-.sceditor-button:first-child {
-  border-radius: 4px 0 0 4px;
-  background-clip: padding-box;
-}
-.sceditor-button:last-child {
-  border-radius: 0 4px 4px 0;
-  background-clip: padding-box;
-}
-.sceditor-button div,
-.sceditor-button svg {
-  margin: 0;
-}
-.sceditor-button.active {
-  background: #fbdbb5;
-  background: linear-gradient(to bottom, #fbdbb5 11%, #feb456 29%, #fdeb9f 99%);
-  box-shadow: inset 0 1px #ebd1b4, inset 0 -1px #ffe47f, inset -1px 0 #b8ceea;
-}
-.sceditor-button:hover {
-  background: #fef7d5;
-  background: linear-gradient(to bottom, #fef7d5 0%, #fae5a9 42%, #ffd048 42%, #ffe59f 100%);
-  box-shadow: inset 0 1px #fffbe8, inset -1px 0 #ffefc4, inset 0 -1px #fff9cc;
-}
-.sceditor-button:active {
-  background: #e7a66d;
-  background: linear-gradient(to bottom, #e7a66d 0%, #fcb16d 1%, #ff8d05 42%, #ffc450 100%);
-  box-shadow: inset 0 1px 1px #7b6645, inset 0 -1px #d19c33;
-}
-.sceditor-button.active:hover {
-  background: #dba368;
-  background: linear-gradient(to bottom, #dba368 0%, #ffbd79 4%, #fea335 34%, #ffc64c 66%, #fee069 100%);
-  box-shadow: inset 0 1px 1px #9e8255, inset 0 -1px #fcce6b;
-}

+ 0 - 618
public/style/sc/themes/office.css

@@ -1,618 +0,0 @@
-/**
- * Copyright (C) 2012, Sam Clarke (samclarke.com)
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- *
- * Icons by Mark James (http://www.famfamfam.com/lab/icons/silk/)
- * Licensed under the Creative Commons CC-BY license (http://creativecommons.org/licenses/by/3.0/)
- */
-/**
- * Copyright (C) 2012, Sam Clarke (samclarke.com)
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- *
- * Icons by Mark James (http://www.famfamfam.com/lab/icons/silk/)
- * Licensed under the Creative Commons CC-BY license (http://creativecommons.org/licenses/by/3.0/)
- */
-/*! SCEditor | (C) 2011-2016, Sam Clarke | sceditor.com/license */
-/**
- * Default SCEditor
- * http://www.sceditor.com/
- *
- * Copyright (C) 2011-16, Sam Clarke
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- */
-div.sceditor-grip,
-.sceditor-button div {
-  background-image: url("famfamfam.png");
-  background-repeat: no-repeat;
-  width: 16px;
-  height: 16px;
-}
-.sceditor-button-youtube div {
-  background-position: 0px 0px;
-}
-.sceditor-button-link div {
-  background-position: 0px -16px;
-}
-.sceditor-button-unlink div {
-  background-position: 0px -32px;
-}
-.sceditor-button-underline div {
-  background-position: 0px -48px;
-}
-.sceditor-button-time div {
-  background-position: 0px -64px;
-}
-.sceditor-button-table div {
-  background-position: 0px -80px;
-}
-.sceditor-button-superscript div {
-  background-position: 0px -96px;
-}
-.sceditor-button-subscript div {
-  background-position: 0px -112px;
-}
-.sceditor-button-strike div {
-  background-position: 0px -128px;
-}
-.sceditor-button-source div {
-  background-position: 0px -144px;
-}
-.sceditor-button-size div {
-  background-position: 0px -160px;
-}
-.sceditor-button-rtl div {
-  background-position: 0px -176px;
-}
-.sceditor-button-right div {
-  background-position: 0px -192px;
-}
-.sceditor-button-removeformat div {
-  background-position: 0px -208px;
-}
-.sceditor-button-quote div {
-  background-position: 0px -224px;
-}
-.sceditor-button-print div {
-  background-position: 0px -240px;
-}
-.sceditor-button-pastetext div {
-  background-position: 0px -256px;
-}
-.sceditor-button-paste div {
-  background-position: 0px -272px;
-}
-.sceditor-button-outdent div {
-  background-position: 0px -288px;
-}
-.sceditor-button-orderedlist div {
-  background-position: 0px -304px;
-}
-.sceditor-button-maximize div {
-  background-position: 0px -320px;
-}
-.sceditor-button-ltr div {
-  background-position: 0px -336px;
-}
-.sceditor-button-left div {
-  background-position: 0px -352px;
-}
-.sceditor-button-justify div {
-  background-position: 0px -368px;
-}
-.sceditor-button-italic div {
-  background-position: 0px -384px;
-}
-.sceditor-button-indent div {
-  background-position: 0px -400px;
-}
-.sceditor-button-image div {
-  background-position: 0px -416px;
-}
-.sceditor-button-horizontalrule div {
-  background-position: 0px -432px;
-}
-.sceditor-button-format div {
-  background-position: 0px -448px;
-}
-.sceditor-button-font div {
-  background-position: 0px -464px;
-}
-.sceditor-button-emoticon div {
-  background-position: 0px -480px;
-}
-.sceditor-button-email div {
-  background-position: 0px -496px;
-}
-.sceditor-button-date div {
-  background-position: 0px -512px;
-}
-.sceditor-button-cut div {
-  background-position: 0px -528px;
-}
-.sceditor-button-copy div {
-  background-position: 0px -544px;
-}
-.sceditor-button-color div {
-  background-position: 0px -560px;
-}
-.sceditor-button-code div {
-  background-position: 0px -576px;
-}
-.sceditor-button-center div {
-  background-position: 0px -592px;
-}
-.sceditor-button-bulletlist div {
-  background-position: 0px -608px;
-}
-.sceditor-button-bold div {
-  background-position: 0px -624px;
-}
-div.sceditor-grip {
-  background-position: 0px -640px;
-  width: 10px;
-  height: 10px;
-}
-.rtl div.sceditor-grip {
-  background-position: 0px -650px;
-}
-/**
- * SCEditor
- * http://www.sceditor.com/
- *
- * Copyright (C) 2017, Sam Clarke (samclarke.com)
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- */
-/*---------------------------------------------------
-    LESS Elements 0.7
-  ---------------------------------------------------
-    A set of useful LESS mixins
-    More info at: http://lesselements.com
-  ---------------------------------------------------*/
-.sceditor-container {
-  display: -ms-flexbox;
-  display: flex;
-  -ms-flex-direction: column;
-  flex-direction: column;
-  position: relative;
-  background: #fff;
-  border: 1px solid #d9d9d9;
-  font-size: 13px;
-  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
-  color: #333;
-  line-height: 1;
-  font-weight: bold;
-  height: 250px;
-  border-radius: 4px;
-  background-clip: padding-box;
-}
-.sceditor-container *,
-.sceditor-container *:before,
-.sceditor-container *:after {
-  -webkit-box-sizing: content-box;
-  -moz-box-sizing: content-box;
-  box-sizing: content-box;
-}
-.sceditor-container,
-.sceditor-container div,
-div.sceditor-dropdown,
-div.sceditor-dropdown div {
-  padding: 0;
-  margin: 0;
-  z-index: 3;
-}
-.sceditor-container iframe,
-.sceditor-container textarea {
-  display: block;
-  -ms-flex: 1 1 0%;
-  flex: 1 1 0%;
-  line-height: 1.25;
-  border: 0;
-  outline: none;
-  font-family: Verdana, Arial, Helvetica, sans-serif;
-  font-size: 14px;
-  color: #111;
-  padding: 0;
-  margin: 5px;
-  resize: none;
-  background: #fff;
-  height: auto !important;
-  width: auto !important;
-  width: calc(100% - 10px) !important;
-  min-height: 1px;
-}
-.sceditor-container textarea {
-  margin: 7px 5px;
-}
-div.sceditor-dnd-cover {
-  position: absolute;
-  top: 0;
-  left: 0;
-  bottom: 0;
-  right: 0;
-  background: rgba(255, 255, 255, 0.2);
-  border: 5px dashed #aaa;
-  z-index: 200;
-  font-size: 2em;
-  text-align: center;
-  color: #aaa;
-}
-div.sceditor-dnd-cover p {
-  position: relative;
-  top: 45%;
-  pointer-events: none;
-}
-div.sceditor-resize-cover {
-  position: absolute;
-  top: 0;
-  left: 0;
-  background: #000;
-  width: 100%;
-  height: 100%;
-  z-index: 10;
-  opacity: 0.3;
-}
-div.sceditor-grip {
-  overflow: hidden;
-  width: 10px;
-  height: 10px;
-  cursor: pointer;
-  position: absolute;
-  bottom: 0;
-  right: 0;
-  z-index: 3;
-  line-height: 0;
-}
-div.sceditor-grip.has-icon {
-  background-image: none;
-}
-.sceditor-maximize {
-  position: fixed;
-  top: 0;
-  left: 0;
-  height: 100% !important;
-  width: 100% !important;
-  border-radius: 0;
-  background-clip: padding-box;
-  z-index: 2000;
-}
-html.sceditor-maximize,
-body.sceditor-maximize {
-  height: 100%;
-  width: 100%;
-  padding: 0;
-  margin: 0;
-  overflow: hidden;
-}
-.sceditor-maximize div.sceditor-grip {
-  display: none;
-}
-.sceditor-maximize div.sceditor-toolbar {
-  border-radius: 0;
-  background-clip: padding-box;
-}
-/**
-	 * Dropdown styleing
-	 */
-div.sceditor-dropdown {
-  position: absolute;
-  border: 1px solid #ccc;
-  background: #fff;
-  z-index: 4000;
-  padding: 10px;
-  font-weight: normal;
-  font-size: 15px;
-  border-radius: 2px;
-  background-clip: padding-box;
-  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.2);
-}
-div.sceditor-dropdown *,
-div.sceditor-dropdown *:before,
-div.sceditor-dropdown *:after {
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-div.sceditor-dropdown a,
-div.sceditor-dropdown a:link {
-  color: #333;
-}
-div.sceditor-dropdown form {
-  margin: 0;
-}
-div.sceditor-dropdown label {
-  display: block;
-  font-weight: bold;
-  color: #3c3c3c;
-  padding: 4px 0;
-}
-div.sceditor-dropdown input,
-div.sceditor-dropdown textarea {
-  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
-  outline: 0;
-  padding: 4px;
-  border: 1px solid #ccc;
-  border-top-color: #888;
-  margin: 0 0 0.75em;
-  border-radius: 1px;
-  background-clip: padding-box;
-}
-div.sceditor-dropdown textarea {
-  padding: 6px;
-}
-div.sceditor-dropdown input:focus,
-div.sceditor-dropdown textarea:focus {
-  border-color: #aaa;
-  border-top-color: #666;
-  box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.1);
-}
-div.sceditor-dropdown .button {
-  font-weight: bold;
-  color: #444;
-  padding: 6px 12px;
-  background: #ececec;
-  border: solid 1px #ccc;
-  border-radius: 2px;
-  background-clip: padding-box;
-  cursor: pointer;
-  margin: 0.3em 0 0;
-}
-div.sceditor-dropdown .button:hover {
-  background: #f3f3f3;
-  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
-}
-div.sceditor-font-picker,
-div.sceditor-fontsize-picker,
-div.sceditor-format {
-  padding: 6px 0;
-}
-div.sceditor-color-picker {
-  padding: 4px;
-}
-div.sceditor-emoticons,
-div.sceditor-more-emoticons {
-  padding: 0;
-}
-.sceditor-pastetext textarea {
-  border: 1px solid #bbb;
-  width: 20em;
-}
-.sceditor-emoticons img,
-.sceditor-more-emoticons img {
-  padding: 0;
-  cursor: pointer;
-  margin: 2px;
-}
-.sceditor-more {
-  border-top: 1px solid #bbb;
-  display: block;
-  text-align: center;
-  cursor: pointer;
-  font-weight: bold;
-  padding: 6px 0;
-}
-.sceditor-dropdown a:hover {
-  background: #eee;
-}
-.sceditor-fontsize-option,
-.sceditor-font-option,
-.sceditor-format a {
-  display: block;
-  padding: 7px 10px;
-  cursor: pointer;
-  text-decoration: none;
-  color: #222;
-}
-.sceditor-fontsize-option {
-  padding: 7px 13px;
-}
-.sceditor-color-column {
-  float: left;
-}
-.sceditor-color-option {
-  display: block;
-  border: 2px solid #fff;
-  height: 18px;
-  width: 18px;
-  overflow: hidden;
-}
-.sceditor-color-option:hover {
-  border: 1px solid #aaa;
-}
-/**
-	 * Toolbar styleing
-	 */
-div.sceditor-toolbar {
-  flex-shrink: 0;
-  overflow: hidden;
-  padding: 3px 5px 2px;
-  background: #f7f7f7;
-  border-bottom: 1px solid #c0c0c0;
-  line-height: 0;
-  text-align: left;
-  user-select: none;
-  border-radius: 3px 3px 0 0;
-  background-clip: padding-box;
-}
-div.sceditor-group {
-  display: inline-block;
-  background: #ddd;
-  margin: 1px 5px 1px 0;
-  padding: 1px;
-  border-bottom: 1px solid #aaa;
-  border-radius: 3px;
-  background-clip: padding-box;
-}
-.sceditor-button {
-  float: left;
-  cursor: pointer;
-  padding: 3px 5px;
-  width: 16px;
-  height: 20px;
-  border-radius: 3px;
-  background-clip: padding-box;
-}
-.sceditor-button:hover,
-.sceditor-button:active,
-.sceditor-button.active {
-  background: #fff;
-  box-shadow: inset 1px 1px 0 rgba(0,0,0,0.3), inset -1px 0 rgba(0,0,0,0.3), inset 0 -1px 0 rgba(0,0,0,0.2);
-}
-.sceditor-button:active {
-  background: #fff;
-  box-shadow: inset 1px 1px 0 rgba(0,0,0,0.3), inset -1px 0 rgba(0,0,0,0.3), inset 0 -1px 0 rgba(0,0,0,0.2), inset 0 0 8px rgba(0,0,0,0.3);
-}
-.sceditor-button.disabled:hover {
-  background: inherit;
-  cursor: default;
-  box-shadow: none;
-}
-.sceditor-button,
-.sceditor-button div {
-  display: block;
-}
-.sceditor-button svg {
-  display: inline-block;
-  height: 16px;
-  width: 16px;
-  margin: 2px 0;
-  fill: #111;
-  text-decoration: none;
-  pointer-events: none;
-  line-height: 1;
-}
-.sceditor-button.disabled svg {
-  fill: #888;
-}
-.sceditor-button div {
-  display: inline-block;
-  margin: 2px 0;
-  padding: 0;
-  overflow: hidden;
-  line-height: 0;
-  font-size: 0;
-  color: transparent;
-}
-.sceditor-button.has-icon div {
-  display: none;
-}
-.sceditor-button.disabled div {
-  opacity: 0.3;
-}
-.text .sceditor-button,
-.text .sceditor-button div,
-.sceditor-button.text,
-.sceditor-button.text div,
-.text-icon .sceditor-button,
-.text-icon .sceditor-button div,
-.sceditor-button.text-icon,
-.sceditor-button.text-icon div {
-  display: inline-block;
-  width: auto;
-  line-height: 16px;
-  font-size: 1em;
-  color: inherit;
-  text-indent: 0;
-}
-.text-icon .sceditor-button.has-icon div,
-.sceditor-button.has-icon div,
-.text .sceditor-button div,
-.sceditor-button.text div {
-  padding: 0 2px;
-  background: none;
-}
-.text .sceditor-button svg,
-.sceditor-button.text svg {
-  display: none;
-}
-.text-icon .sceditor-button div,
-.sceditor-button.text-icon div {
-  padding: 0 2px 0 20px;
-}
-.rtl div.sceditor-toolbar {
-  text-align: right;
-}
-.rtl .sceditor-button {
-  float: right;
-}
-.rtl div.sceditor-grip {
-  right: auto;
-  left: 0;
-}
-.sceditor-container {
-  border: 1px solid #8db2e3;
-}
-.sceditor-container textarea {
-  font-family: Consolas, "Bitstream Vera Sans Mono", "Andale Mono", Monaco, "DejaVu Sans Mono", "Lucida Console", monospace;
-}
-div.sceditor-toolbar {
-  border-bottom: 1px solid #95a9c3;
-  background: #dee8f5;
-  background: linear-gradient(to bottom, #dee8f5 0%, #c7d8ed 29%, #ccdcee 61%, #c0d8ef 100%);
-}
-div.sceditor-group {
-  border: 1px solid #7596bf;
-  background: transparent;
-  padding: 0;
-  background: #cadcf0;
-  background: linear-gradient(to bottom, #cadcf0 24%, #bcd0e9 38%, #d0e1f7 99%);
-}
-.sceditor-button {
-  height: 16px;
-  padding: 3px 4px;
-  border-radius: 0;
-  background-clip: padding-box;
-  box-shadow: inset 0 1px #d5e3f1, inset 0 -1px #e3edfb, inset 1px 0 #cddcef, inset -1px 0 #b8ceea;
-}
-.sceditor-button:first-child {
-  border-radius: 4px 0 0 4px;
-  background-clip: padding-box;
-}
-.sceditor-button:last-child {
-  border-radius: 0 4px 4px 0;
-  background-clip: padding-box;
-}
-.sceditor-button div,
-.sceditor-button svg {
-  margin: 0;
-}
-.sceditor-button.active {
-  background: #fbdbb5;
-  background: linear-gradient(to bottom, #fbdbb5 11%, #feb456 29%, #fdeb9f 99%);
-  box-shadow: inset 0 1px #ebd1b4, inset 0 -1px #ffe47f, inset -1px 0 #b8ceea;
-}
-.sceditor-button:hover {
-  background: #fef7d5;
-  background: linear-gradient(to bottom, #fef7d5 0%, #fae5a9 42%, #ffd048 42%, #ffe59f 100%);
-  box-shadow: inset 0 1px #fffbe8, inset -1px 0 #ffefc4, inset 0 -1px #fff9cc;
-}
-.sceditor-button:active {
-  background: #e7a66d;
-  background: linear-gradient(to bottom, #e7a66d 0%, #fcb16d 1%, #ff8d05 42%, #ffc450 100%);
-  box-shadow: inset 0 1px 1px #7b6645, inset 0 -1px #d19c33;
-}
-.sceditor-button.active:hover {
-  background: #dba368;
-  background: linear-gradient(to bottom, #dba368 0%, #ffbd79 4%, #fea335 34%, #ffc64c 66%, #fee069 100%);
-  box-shadow: inset 0 1px 1px #9e8255, inset 0 -1px #fcce6b;
-}
-.sceditor-container {
-  background: #a3c2ea;
-  background: linear-gradient(to bottom, #a3c2ea 0%, #6d92c1 39%, #577fb3 64%, #6591cc 100%);
-}
-.sceditor-container iframe,
-.sceditor-container textarea {
-  border: 1px solid #646464;
-  background: #fff;
-  margin: 7px 40px;
-  padding: 20px;
-  width: calc(100% - 120px) !important;
-  box-shadow: 1px 1px 5px #293a52;
-}

+ 0 - 619
public/style/sc/themes/square.css

@@ -1,619 +0,0 @@
-/**
- * Square theme
- *
- * This theme is best suited to short toolbars that
- * don't span multiple lines.
- *
- * Copyright (C) 2012, Sam Clarke (samclarke.com)
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- *
- * Icons by Mark James (http://www.famfamfam.com/lab/icons/silk/)
- * Licensed under the Creative Commons CC-BY license (http://creativecommons.org/licenses/by/3.0/)
- */
-/*! SCEditor | (C) 2011-2016, Sam Clarke | sceditor.com/license */
-/**
- * Default SCEditor
- * http://www.sceditor.com/
- *
- * Copyright (C) 2011-16, Sam Clarke
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- */
-div.sceditor-grip,
-.sceditor-button div {
-  background-image: url("famfamfam.png");
-  background-repeat: no-repeat;
-  width: 16px;
-  height: 16px;
-}
-.sceditor-button-youtube div {
-  background-position: 0px 0px;
-}
-.sceditor-button-link div {
-  background-position: 0px -16px;
-}
-.sceditor-button-unlink div {
-  background-position: 0px -32px;
-}
-.sceditor-button-underline div {
-  background-position: 0px -48px;
-}
-.sceditor-button-time div {
-  background-position: 0px -64px;
-}
-.sceditor-button-table div {
-  background-position: 0px -80px;
-}
-.sceditor-button-superscript div {
-  background-position: 0px -96px;
-}
-.sceditor-button-subscript div {
-  background-position: 0px -112px;
-}
-.sceditor-button-strike div {
-  background-position: 0px -128px;
-}
-.sceditor-button-source div {
-  background-position: 0px -144px;
-}
-.sceditor-button-size div {
-  background-position: 0px -160px;
-}
-.sceditor-button-rtl div {
-  background-position: 0px -176px;
-}
-.sceditor-button-right div {
-  background-position: 0px -192px;
-}
-.sceditor-button-removeformat div {
-  background-position: 0px -208px;
-}
-.sceditor-button-quote div {
-  background-position: 0px -224px;
-}
-.sceditor-button-print div {
-  background-position: 0px -240px;
-}
-.sceditor-button-pastetext div {
-  background-position: 0px -256px;
-}
-.sceditor-button-paste div {
-  background-position: 0px -272px;
-}
-.sceditor-button-outdent div {
-  background-position: 0px -288px;
-}
-.sceditor-button-orderedlist div {
-  background-position: 0px -304px;
-}
-.sceditor-button-maximize div {
-  background-position: 0px -320px;
-}
-.sceditor-button-ltr div {
-  background-position: 0px -336px;
-}
-.sceditor-button-left div {
-  background-position: 0px -352px;
-}
-.sceditor-button-justify div {
-  background-position: 0px -368px;
-}
-.sceditor-button-italic div {
-  background-position: 0px -384px;
-}
-.sceditor-button-indent div {
-  background-position: 0px -400px;
-}
-.sceditor-button-image div {
-  background-position: 0px -416px;
-}
-.sceditor-button-horizontalrule div {
-  background-position: 0px -432px;
-}
-.sceditor-button-format div {
-  background-position: 0px -448px;
-}
-.sceditor-button-font div {
-  background-position: 0px -464px;
-}
-.sceditor-button-emoticon div {
-  background-position: 0px -480px;
-}
-.sceditor-button-email div {
-  background-position: 0px -496px;
-}
-.sceditor-button-date div {
-  background-position: 0px -512px;
-}
-.sceditor-button-cut div {
-  background-position: 0px -528px;
-}
-.sceditor-button-copy div {
-  background-position: 0px -544px;
-}
-.sceditor-button-color div {
-  background-position: 0px -560px;
-}
-.sceditor-button-code div {
-  background-position: 0px -576px;
-}
-.sceditor-button-center div {
-  background-position: 0px -592px;
-}
-.sceditor-button-bulletlist div {
-  background-position: 0px -608px;
-}
-.sceditor-button-bold div {
-  background-position: 0px -624px;
-}
-div.sceditor-grip {
-  background-position: 0px -640px;
-  width: 10px;
-  height: 10px;
-}
-.rtl div.sceditor-grip {
-  background-position: 0px -650px;
-}
-/**
- * SCEditor
- * http://www.sceditor.com/
- *
- * Copyright (C) 2017, Sam Clarke (samclarke.com)
- *
- * SCEditor is licensed under the MIT license:
- *	http://www.opensource.org/licenses/mit-license.php
- */
-/*---------------------------------------------------
-    LESS Elements 0.7
-  ---------------------------------------------------
-    A set of useful LESS mixins
-    More info at: http://lesselements.com
-  ---------------------------------------------------*/
-.sceditor-container {
-  display: -ms-flexbox;
-  display: flex;
-  -ms-flex-direction: column;
-  flex-direction: column;
-  position: relative;
-  background: #fff;
-  border: 1px solid #d9d9d9;
-  font-size: 13px;
-  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
-  color: #333;
-  line-height: 1;
-  font-weight: bold;
-  height: 250px;
-  border-radius: 4px;
-  background-clip: padding-box;
-}
-.sceditor-container *,
-.sceditor-container *:before,
-.sceditor-container *:after {
-  -webkit-box-sizing: content-box;
-  -moz-box-sizing: content-box;
-  box-sizing: content-box;
-}
-.sceditor-container,
-.sceditor-container div,
-div.sceditor-dropdown,
-div.sceditor-dropdown div {
-  padding: 0;
-  margin: 0;
-  z-index: 3;
-}
-.sceditor-container iframe,
-.sceditor-container textarea {
-  display: block;
-  -ms-flex: 1 1 0%;
-  flex: 1 1 0%;
-  line-height: 1.25;
-  border: 0;
-  outline: none;
-  font-family: Verdana, Arial, Helvetica, sans-serif;
-  font-size: 14px;
-  color: #111;
-  padding: 0;
-  margin: 5px;
-  resize: none;
-  background: #fff;
-  height: auto !important;
-  width: auto !important;
-  width: calc(100% - 10px) !important;
-  min-height: 1px;
-}
-.sceditor-container textarea {
-  margin: 7px 5px;
-}
-div.sceditor-dnd-cover {
-  position: absolute;
-  top: 0;
-  left: 0;
-  bottom: 0;
-  right: 0;
-  background: rgba(255, 255, 255, 0.2);
-  border: 5px dashed #aaa;
-  z-index: 200;
-  font-size: 2em;
-  text-align: center;
-  color: #aaa;
-}
-div.sceditor-dnd-cover p {
-  position: relative;
-  top: 45%;
-  pointer-events: none;
-}
-div.sceditor-resize-cover {
-  position: absolute;
-  top: 0;
-  left: 0;
-  background: #000;
-  width: 100%;
-  height: 100%;
-  z-index: 10;
-  opacity: 0.3;
-}
-div.sceditor-grip {
-  overflow: hidden;
-  width: 10px;
-  height: 10px;
-  cursor: pointer;
-  position: absolute;
-  bottom: 0;
-  right: 0;
-  z-index: 3;
-  line-height: 0;
-}
-div.sceditor-grip.has-icon {
-  background-image: none;
-}
-.sceditor-maximize {
-  position: fixed;
-  top: 0;
-  left: 0;
-  height: 100% !important;
-  width: 100% !important;
-  border-radius: 0;
-  background-clip: padding-box;
-  z-index: 2000;
-}
-html.sceditor-maximize,
-body.sceditor-maximize {
-  height: 100%;
-  width: 100%;
-  padding: 0;
-  margin: 0;
-  overflow: hidden;
-}
-.sceditor-maximize div.sceditor-grip {
-  display: none;
-}
-.sceditor-maximize div.sceditor-toolbar {
-  border-radius: 0;
-  background-clip: padding-box;
-}
-/**
-	 * Dropdown styleing
-	 */
-div.sceditor-dropdown {
-  position: absolute;
-  border: 1px solid #ccc;
-  background: #fff;
-  z-index: 4000;
-  padding: 10px;
-  font-weight: normal;
-  font-size: 15px;
-  border-radius: 2px;
-  background-clip: padding-box;
-  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.2);
-}
-div.sceditor-dropdown *,
-div.sceditor-dropdown *:before,
-div.sceditor-dropdown *:after {
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-div.sceditor-dropdown a,
-div.sceditor-dropdown a:link {
-  color: #333;
-}
-div.sceditor-dropdown form {
-  margin: 0;
-}
-div.sceditor-dropdown label {
-  display: block;
-  font-weight: bold;
-  color: #3c3c3c;
-  padding: 4px 0;
-}
-div.sceditor-dropdown input,
-div.sceditor-dropdown textarea {
-  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
-  outline: 0;
-  padding: 4px;
-  border: 1px solid #ccc;
-  border-top-color: #888;
-  margin: 0 0 0.75em;
-  border-radius: 1px;
-  background-clip: padding-box;
-}
-div.sceditor-dropdown textarea {
-  padding: 6px;
-}
-div.sceditor-dropdown input:focus,
-div.sceditor-dropdown textarea:focus {
-  border-color: #aaa;
-  border-top-color: #666;
-  box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.1);
-}
-div.sceditor-dropdown .button {
-  font-weight: bold;
-  color: #444;
-  padding: 6px 12px;
-  background: #ececec;
-  border: solid 1px #ccc;
-  border-radius: 2px;
-  background-clip: padding-box;
-  cursor: pointer;
-  margin: 0.3em 0 0;
-}
-div.sceditor-dropdown .button:hover {
-  background: #f3f3f3;
-  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
-}
-div.sceditor-font-picker,
-div.sceditor-fontsize-picker,
-div.sceditor-format {
-  padding: 6px 0;
-}
-div.sceditor-color-picker {
-  padding: 4px;
-}
-div.sceditor-emoticons,
-div.sceditor-more-emoticons {
-  padding: 0;
-}
-.sceditor-pastetext textarea {
-  border: 1px solid #bbb;
-  width: 20em;
-}
-.sceditor-emoticons img,
-.sceditor-more-emoticons img {
-  padding: 0;
-  cursor: pointer;
-  margin: 2px;
-}
-.sceditor-more {
-  border-top: 1px solid #bbb;
-  display: block;
-  text-align: center;
-  cursor: pointer;
-  font-weight: bold;
-  padding: 6px 0;
-}
-.sceditor-dropdown a:hover {
-  background: #eee;
-}
-.sceditor-fontsize-option,
-.sceditor-font-option,
-.sceditor-format a {
-  display: block;
-  padding: 7px 10px;
-  cursor: pointer;
-  text-decoration: none;
-  color: #222;
-}
-.sceditor-fontsize-option {
-  padding: 7px 13px;
-}
-.sceditor-color-column {
-  float: left;
-}
-.sceditor-color-option {
-  display: block;
-  border: 2px solid #fff;
-  height: 18px;
-  width: 18px;
-  overflow: hidden;
-}
-.sceditor-color-option:hover {
-  border: 1px solid #aaa;
-}
-/**
-	 * Toolbar styleing
-	 */
-div.sceditor-toolbar {
-  flex-shrink: 0;
-  overflow: hidden;
-  padding: 3px 5px 2px;
-  background: #f7f7f7;
-  border-bottom: 1px solid #c0c0c0;
-  line-height: 0;
-  text-align: left;
-  user-select: none;
-  border-radius: 3px 3px 0 0;
-  background-clip: padding-box;
-}
-div.sceditor-group {
-  display: inline-block;
-  background: #ddd;
-  margin: 1px 5px 1px 0;
-  padding: 1px;
-  border-bottom: 1px solid #aaa;
-  border-radius: 3px;
-  background-clip: padding-box;
-}
-.sceditor-button {
-  float: left;
-  cursor: pointer;
-  padding: 3px 5px;
-  width: 16px;
-  height: 20px;
-  border-radius: 3px;
-  background-clip: padding-box;
-}
-.sceditor-button:hover,
-.sceditor-button:active,
-.sceditor-button.active {
-  background: #fff;
-  box-shadow: inset 1px 1px 0 rgba(0,0,0,0.3), inset -1px 0 rgba(0,0,0,0.3), inset 0 -1px 0 rgba(0,0,0,0.2);
-}
-.sceditor-button:active {
-  background: #fff;
-  box-shadow: inset 1px 1px 0 rgba(0,0,0,0.3), inset -1px 0 rgba(0,0,0,0.3), inset 0 -1px 0 rgba(0,0,0,0.2), inset 0 0 8px rgba(0,0,0,0.3);
-}
-.sceditor-button.disabled:hover {
-  background: inherit;
-  cursor: default;
-  box-shadow: none;
-}
-.sceditor-button,
-.sceditor-button div {
-  display: block;
-}
-.sceditor-button svg {
-  display: inline-block;
-  height: 16px;
-  width: 16px;
-  margin: 2px 0;
-  fill: #111;
-  text-decoration: none;
-  pointer-events: none;
-  line-height: 1;
-}
-.sceditor-button.disabled svg {
-  fill: #888;
-}
-.sceditor-button div {
-  display: inline-block;
-  margin: 2px 0;
-  padding: 0;
-  overflow: hidden;
-  line-height: 0;
-  font-size: 0;
-  color: transparent;
-}
-.sceditor-button.has-icon div {
-  display: none;
-}
-.sceditor-button.disabled div {
-  opacity: 0.3;
-}
-.text .sceditor-button,
-.text .sceditor-button div,
-.sceditor-button.text,
-.sceditor-button.text div,
-.text-icon .sceditor-button,
-.text-icon .sceditor-button div,
-.sceditor-button.text-icon,
-.sceditor-button.text-icon div {
-  display: inline-block;
-  width: auto;
-  line-height: 16px;
-  font-size: 1em;
-  color: inherit;
-  text-indent: 0;
-}
-.text-icon .sceditor-button.has-icon div,
-.sceditor-button.has-icon div,
-.text .sceditor-button div,
-.sceditor-button.text div {
-  padding: 0 2px;
-  background: none;
-}
-.text .sceditor-button svg,
-.sceditor-button.text svg {
-  display: none;
-}
-.text-icon .sceditor-button div,
-.sceditor-button.text-icon div {
-  padding: 0 2px 0 20px;
-}
-.rtl div.sceditor-toolbar {
-  text-align: right;
-}
-.rtl .sceditor-button {
-  float: right;
-}
-.rtl div.sceditor-grip {
-  right: auto;
-  left: 0;
-}
-.sceditor-container {
-  border: 1px solid #d6d6d6;
-  border-radius: 0;
-  background-clip: padding-box;
-}
-.sceditor-container textarea {
-  font-family: Consolas, "Bitstream Vera Sans Mono", "Andale Mono", Monaco, "DejaVu Sans Mono", "Lucida Console", monospace;
-  background: #2e3436;
-  color: #fff;
-  margin: 0;
-  padding: 5px;
-}
-div.sceditor-toolbar,
-div.sceditor-group {
-  background: #f2f2f2;
-  background: linear-gradient(to bottom, #f2f2f2 0%, #dddddd 89%);
-}
-div.sceditor-toolbar {
-  padding: 0;
-  border-bottom: 1px solid #bbb;
-  background-size: 100% 32px;
-}
-div.sceditor-group {
-  margin: 0;
-  padding: 2px 4px;
-  border: 0;
-  border-right: 1px solid #ccc;
-  border-left: 1px solid #eaeaea;
-  border-radius: 0;
-  background-clip: padding-box;
-}
-div.sceditor-group:last-child {
-  border-right: 0;
-}
-div.sceditor-group:first-child {
-  border-left: 0;
-}
-.sceditor-button {
-  height: 16px;
-  padding: 5px;
-  margin: 1px;
-  border-radius: 0;
-  background-clip: padding-box;
-}
-.sceditor-button div,
-.sceditor-button svg {
-  margin: 0;
-}
-.sceditor-button.active,
-.sceditor-button:hover,
-.sceditor-button:active,
-.sceditor-button.active:hover {
-  margin: 0;
-  box-shadow: none;
-}
-.sceditor-button.active {
-  background: #f4f4f4;
-  border: 1px solid #ccc;
-}
-.sceditor-button:hover {
-  background: #fefefe;
-  border: 1px solid #ddd;
-}
-.sceditor-button.disabled:hover {
-  margin: 1px;
-  border: 0;
-}
-.sceditor-button:active {
-  background: #eee;
-  border: 1px solid #ccc;
-}
-.sceditor-button.active:hover {
-  background: #f8f8f8;
-  border: 1px solid #ddd;
-}