diff --git a/20151121-tinymce-xxx-skin.zip b/20151121-tinymce-xxx-skin.zip deleted file mode 100644 index c56391b..0000000 Binary files a/20151121-tinymce-xxx-skin.zip and /dev/null differ diff --git a/lib/purify.inc.php b/lib/purify.inc.php index e2628a7..2782ae2 100644 --- a/lib/purify.inc.php +++ b/lib/purify.inc.php @@ -1,8 +1,8 @@ - + :first-child { + margin-top: 1em; +} +.xed-area blockquote { + margin: 1em 40px; +} + +.xed-toolbar { + display: flex; + flex-wrap: wrap; + flex: none; + padding: 2px 0 4px; + border-bottom: 1px dashed #006633; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} +.xed-group { + display: flex; + gap: 2px; + margin: 2px 0 0 2px; +} +.xed-group + .xed-group { + margin-left: 3px; + padding-left: 3px; + border-left: 1px solid #9ef89e; +} + +.xed-btn { + box-sizing: border-box; + display: flex; + align-items: center; + justify-content: center; + width: 28px; + height: 24px; + margin: 0; + padding: 0; + border: 1px solid transparent; + border-radius: 0; + background-color: #e0efe0; + color: #333333; + cursor: pointer; +} +.xed-btn:hover, +.xed-btn:focus-visible { + background-color: #cde8cd; + border-color: #86f686; + outline: none; +} +.xed-btn.xed-active { + background-color: #bfe7bf; + border-color: #86f686; +} +.xed-btn svg { + display: block; + filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.75)); +} + +/* Dialogs */ +.xed-modal-block { + position: fixed; + inset: 0; + z-index: 1000; + background-color: rgba(0, 0, 0, 0.3); +} +.xed-window { + position: fixed; + top: 50%; + left: 50%; + z-index: 1001; + transform: translate(-50%, -50%); + box-sizing: border-box; + max-width: calc(100vw - 20px); + max-height: calc(100vh - 20px); + overflow: auto; + border: 1px dashed #006633; + background-color: #e5fde5; + color: #333333; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + text-align: left; +} +.xed-window-head { + display: flex; + align-items: center; + padding: 9px 15px; + border-bottom: 1px dashed #006633; +} +.xed-title { + flex: 1; + padding-right: 10px; + font-size: 20px; + font-weight: bold; + line-height: 20px; +} +.xed-close { + padding: 0; + border: 0; + background: none; + color: #6d6d6d; + font: bold 20px/20px "Helvetica Neue", Helvetica, Arial, sans-serif; + cursor: pointer; +} +.xed-close:hover { + color: #333333; +} +.xed-window-body { + padding: 20px; +} +.xed-foot { + display: flex; + justify-content: flex-end; + gap: 3px; + padding: 10px; + border-top: 1px dashed #006633; +} +.xed-button { + box-sizing: border-box; + height: 30px; + padding: 4px 8px; + border: 1px solid transparent; + border-radius: 0; + background-color: #e0efe0; + color: #333333; + font: 14px/20px "Helvetica Neue", Helvetica, Arial, sans-serif; + cursor: pointer; +} +.xed-button:hover, +.xed-button:focus-visible { + background-color: #cde8cd; + border-color: #86f686; + outline: none; +} +.xed-button.xed-primary { + min-width: 52px; + background-color: #006dcc; + color: #ffffff; +} +.xed-button.xed-primary:hover, +.xed-button.xed-primary:focus-visible { + background-color: #005fb3; + border-color: transparent; +} + +/* Link dialog */ +.xed-form { + width: 409px; + max-width: 100%; +} +.xed-row { + display: flex; + align-items: center; + margin-bottom: 10px; +} +.xed-row:last-child { + margin-bottom: 0; +} +.xed-row label { + flex: 0 0 120px; + line-height: 16px; +} +.xed-textbox { + box-sizing: border-box; + flex: 1; + min-width: 0; + height: 30px; + padding: 0 4px; + border: 1px solid #c5c5c5; + border-radius: 0; + background-color: #ffffff; + color: #333333; + font: 14px "Helvetica Neue", Helvetica, Arial, sans-serif; +} +.xed-textbox:focus { + border-color: #59a5e1; + outline: none; +} + +/* Special character dialog */ +.xed-window-body:has(.xed-charmap-body) { + padding: 10px; +} +.xed-charmap-body { + display: flex; + gap: 20px; + align-items: flex-start; +} +.xed-charmap { + border-collapse: collapse; +} +.xed-charmap td { + min-width: 12px; + height: 20px; + padding: 2px; + border: 1px dashed #006633; + line-height: 20px; + text-align: center; + vertical-align: middle; + cursor: default; +} +.xed-charmap td:hover, +.xed-charmap td:focus-visible { + background-color: #9ec49e; + outline: none; +} +.xed-charmap-preview { + width: 120px; + text-align: center; +} +.xed-charmap-char { + height: 80px; + font-size: 40px; + line-height: 80px; +} +.xed-charmap-name { + margin-top: 10px; + font-size: 14px; +} + +/* Source code dialog */ +.xed-source { + box-sizing: border-box; + display: block; + width: 600px; + max-width: 100%; + height: 500px; + max-height: calc(100vh - 160px); + padding: 4px; + border: 1px solid #59a5e1; + border-radius: 0; + background-color: #ffffff; + color: #333333; + font: 14px "Helvetica Neue", Helvetica, Arial, sans-serif; + resize: none; +} +.xed-source:focus { + outline: none; +} diff --git a/publish/editor.inc.php b/publish/editor.inc.php new file mode 100644 index 0000000..7b95f94 --- /dev/null +++ b/publish/editor.inc.php @@ -0,0 +1,15 @@ + + + + diff --git a/publish/editor.js b/publish/editor.js new file mode 100644 index 0000000..864534b --- /dev/null +++ b/publish/editor.js @@ -0,0 +1,1065 @@ +/* + * A small rich-text editor for the story field, in place of TinyMCE. + * + * The textarea stays in the form and is what gets posted. The editor hides + * it, shows a contenteditable box with the same content, and copies the + * box back into the textarea after every change. Without JavaScript the + * plain textarea is still there. + * + * The toolbar has the buttons that the TinyMCE setup had: bold, italic, + * the four alignments, blockquote, outdent, indent, link, unlink, special + * characters and the HTML source. The HTML it writes is the same as + * TinyMCE wrote, for example

and + * padding-left steps of 30px. The server cleans the story with HTML + * Purifier in any case. + * + * Usage: XxxEditor.attach(textarea) returns an object with getContent(), + * setContent(html) and focus(). + */ +var XxxEditor = (function () { + "use strict"; + + var SVG_NS = "http://www.w3.org/2000/svg"; + + // Icons in a 16-unit box. "fill" paths are solid shapes; "stroke" paths + // are lines, in their own box size. + var ICONS = { + bold: { fill: ["M4 2h4.8c2 0 3.4 1.2 3.4 3 0 1.1-.6 2-1.5 2.4 1.2.4 2 1.4 2 2.8 0 2.1-1.6 3.8-3.9 3.8H4z" + + "M6.5 4.1v2.9h2c.9 0 1.5-.6 1.5-1.45S9.4 4.1 8.5 4.1z" + + "M6.5 9v3.9h2.4c1 0 1.7-.8 1.7-1.95S9.9 9 8.9 9z"] }, + italic: { fill: ["M6.5 2h6v1.8h-2.1L8.1 12.2h2.1V14h-6v-1.8h2.1l2.3-8.4H6.5z"] }, + alignleft: { fill: ["M1 2h14v2H1zM1 6h9v2H1zM1 10h14v2H1zM1 14h9v2H1z"] }, + aligncenter: { fill: ["M1 2h14v2H1zM3.5 6h9v2h-9zM1 10h14v2H1zM3.5 14h9v2h-9z"] }, + alignright: { fill: ["M1 2h14v2H1zM6 6h9v2H6zM1 10h14v2H1zM6 14h9v2H6z"] }, + alignjustify: { fill: ["M1 2h14v2H1zM1 6h14v2H1zM1 10h14v2H1zM1 14h14v2H1z"] }, + blockquote: { fill: ["M7.5 10.5a3 3 0 1 1-6 0C1.5 6.8 3.4 4.3 7 3.6v1.8C5.3 5.9 4.4 6.9 4.2 7.6A3 3 0 0 1 7.5 10.5z" + + "M14.5 10.5a3 3 0 1 1-6 0C8.5 6.8 10.4 4.3 14 3.6v1.8c-1.7.5-2.6 1.5-2.8 2.2a3 3 0 0 1 3.3 2.9z"] }, + outdent: { fill: ["M1 2h14v2H1zM1 6h8v2H1zM1 10h8v2H1zM1 14h14v2H1zM15 5.5v5L11 8z"] }, + indent: { fill: ["M1 2h14v2H1zM7 6h8v2H7zM7 10h8v2H7zM1 14h14v2H1zM1 5.5v5L5 8z"] }, + link: { box: 24, stroke: ["M10 13a5 5 0 0 0 7.5.5l2-2a5 5 0 0 0-7-7l-1 1", + "M14 11a5 5 0 0 0-7.5-.5l-2 2a5 5 0 0 0 7 7l1-1"] }, + unlink: { box: 24, stroke: ["M16.4 13.3L18.9 10.7A4 4 0 0 0 13.3 5.1L10.7 7.6", + "M13.3 16.4L10.7 18.9A4 4 0 0 1 5.1 13.3L7.6 10.7"] }, + charmap: { box: 16, width: 1.7, stroke: ["M2 14.2h3.9v-1.7a5 5 0 1 1 4.2 0v1.7H14"] }, + code: { box: 16, width: 1.6, stroke: ["M5.5 5L2.5 8l3 3", "M10.5 5l3 3-3 3"] } + }; + + // Toolbar groups, in the same order as the TinyMCE toolbar + var TOOLBAR = [ + [{ command: "bold", title: "Bold", key: "b" }, + { command: "italic", title: "Italic", key: "i" }], + [{ command: "alignleft", title: "Align left" }, + { command: "aligncenter", title: "Align center" }, + { command: "alignright", title: "Align right" }, + { command: "alignjustify", title: "Justify" }], + [{ command: "blockquote", title: "Blockquote" }], + [{ command: "outdent", title: "Decrease indent" }, + { command: "indent", title: "Increase indent" }], + [{ command: "link", title: "Insert/edit link", key: "k" }, + { command: "unlink", title: "Remove link" }], + [{ command: "charmap", title: "Special character" }, + { command: "code", title: "Source code" }] + ]; + + var ALIGN = { alignleft: "left", aligncenter: "center", alignright: "right", alignjustify: "justify" }; + var INDENT_STEP = 30; // pixels, as TinyMCE used + + // The special characters, as in the TinyMCE charmap plugin + var CHARMAP = [ + [160, "no-break space"], [173, "soft hyphen"], [34, "quotation mark"], + [162, "cent sign"], [8364, "euro sign"], [163, "pound sign"], + [165, "yen sign"], [169, "copyright sign"], [174, "registered sign"], + [8482, "trade mark sign"], [8240, "per mille sign"], [181, "micro sign"], + [183, "middle dot"], [8226, "bullet"], [8230, "three dot leader"], + [8242, "minutes / feet"], [8243, "seconds / inches"], + [167, "section sign"], [182, "paragraph sign"], [223, "sharp s / ess-zed"], + [8249, "single left-pointing angle quotation mark"], + [8250, "single right-pointing angle quotation mark"], + [171, "left pointing guillemet"], [187, "right pointing guillemet"], + [8216, "left single quotation mark"], + [8217, "right single quotation mark"], + [8220, "left double quotation mark"], + [8221, "right double quotation mark"], + [8218, "single low-9 quotation mark"], + [8222, "double low-9 quotation mark"], [60, "less-than sign"], + [62, "greater-than sign"], [8804, "less-than or equal to"], + [8805, "greater-than or equal to"], [8211, "en dash"], [8212, "em dash"], + [175, "macron"], [8254, "overline"], [164, "currency sign"], + [166, "broken bar"], [168, "diaeresis"], + [161, "inverted exclamation mark"], [191, "turned question mark"], + [710, "circumflex accent"], [732, "small tilde"], [176, "degree sign"], + [8722, "minus sign"], [177, "plus-minus sign"], [247, "division sign"], + [8260, "fraction slash"], [215, "multiplication sign"], + [185, "superscript one"], [178, "superscript two"], + [179, "superscript three"], [188, "fraction one quarter"], + [189, "fraction one half"], [190, "fraction three quarters"], + [402, "function / florin"], [8747, "integral"], [8721, "n-ary sumation"], + [8734, "infinity"], [8730, "square root"], [8764, "similar to"], + [8773, "approximately equal to"], [8776, "almost equal to"], + [8800, "not equal to"], [8801, "identical to"], [8712, "element of"], + [8713, "not an element of"], [8715, "contains as member"], + [8719, "n-ary product"], [8743, "logical and"], [8744, "logical or"], + [172, "not sign"], [8745, "intersection"], [8746, "union"], + [8706, "partial differential"], [8704, "for all"], [8707, "there exists"], + [8709, "diameter"], [8711, "backward difference"], + [8727, "asterisk operator"], [8733, "proportional to"], [8736, "angle"], + [180, "acute accent"], [184, "cedilla"], + [170, "feminine ordinal indicator"], [186, "masculine ordinal indicator"], + [8224, "dagger"], [8225, "double dagger"], [192, "A - grave"], + [193, "A - acute"], [194, "A - circumflex"], [195, "A - tilde"], + [196, "A - diaeresis"], [197, "A - ring above"], [198, "ligature AE"], + [199, "C - cedilla"], [200, "E - grave"], [201, "E - acute"], + [202, "E - circumflex"], [203, "E - diaeresis"], [204, "I - grave"], + [205, "I - acute"], [206, "I - circumflex"], [207, "I - diaeresis"], + [208, "ETH"], [209, "N - tilde"], [210, "O - grave"], [211, "O - acute"], + [212, "O - circumflex"], [213, "O - tilde"], [214, "O - diaeresis"], + [216, "O - slash"], [338, "ligature OE"], [352, "S - caron"], + [217, "U - grave"], [218, "U - acute"], [219, "U - circumflex"], + [220, "U - diaeresis"], [221, "Y - acute"], [376, "Y - diaeresis"], + [222, "THORN"], [224, "a - grave"], [225, "a - acute"], + [226, "a - circumflex"], [227, "a - tilde"], [228, "a - diaeresis"], + [229, "a - ring above"], [230, "ligature ae"], [231, "c - cedilla"], + [232, "e - grave"], [233, "e - acute"], [234, "e - circumflex"], + [235, "e - diaeresis"], [236, "i - grave"], [237, "i - acute"], + [238, "i - circumflex"], [239, "i - diaeresis"], [240, "eth"], + [241, "n - tilde"], [242, "o - grave"], [243, "o - acute"], + [244, "o - circumflex"], [245, "o - tilde"], [246, "o - diaeresis"], + [248, "o slash"], [339, "ligature oe"], [353, "s - caron"], + [249, "u - grave"], [250, "u - acute"], [251, "u - circumflex"], + [252, "u - diaeresis"], [253, "y - acute"], [254, "thorn"], + [255, "y - diaeresis"], [913, "Alpha"], [914, "Beta"], [915, "Gamma"], + [916, "Delta"], [917, "Epsilon"], [918, "Zeta"], [919, "Eta"], + [920, "Theta"], [921, "Iota"], [922, "Kappa"], [923, "Lambda"], + [924, "Mu"], [925, "Nu"], [926, "Xi"], [927, "Omicron"], [928, "Pi"], + [929, "Rho"], [931, "Sigma"], [932, "Tau"], [933, "Upsilon"], [934, "Phi"], + [935, "Chi"], [936, "Psi"], [937, "Omega"], [945, "alpha"], [946, "beta"], + [947, "gamma"], [948, "delta"], [949, "epsilon"], [950, "zeta"], + [951, "eta"], [952, "theta"], [953, "iota"], [954, "kappa"], + [955, "lambda"], [956, "mu"], [957, "nu"], [958, "xi"], [959, "omicron"], + [960, "pi"], [961, "rho"], [962, "final sigma"], [963, "sigma"], + [964, "tau"], [965, "upsilon"], [966, "phi"], [967, "chi"], [968, "psi"], + [969, "omega"], [8501, "alef symbol"], [982, "pi symbol"], + [8476, "real part symbol"], [978, "upsilon - hook symbol"], + [8472, "Weierstrass p"], [8465, "imaginary part"], + [8592, "leftwards arrow"], [8593, "upwards arrow"], + [8594, "rightwards arrow"], [8595, "downwards arrow"], + [8596, "left right arrow"], [8629, "carriage return"], + [8656, "leftwards double arrow"], [8657, "upwards double arrow"], + [8658, "rightwards double arrow"], [8659, "downwards double arrow"], + [8660, "left right double arrow"], [8756, "therefore"], + [8834, "subset of"], [8835, "superset of"], [8836, "not a subset of"], + [8838, "subset of or equal to"], [8839, "superset of or equal to"], + [8853, "circled plus"], [8855, "circled times"], [8869, "perpendicular"], + [8901, "dot operator"], [8968, "left ceiling"], [8969, "right ceiling"], + [8970, "left floor"], [8971, "right floor"], + [9001, "left-pointing angle bracket"], + [9002, "right-pointing angle bracket"], [9674, "lozenge"], + [9824, "black spade suit"], [9827, "black club suit"], + [9829, "black heart suit"], [9830, "black diamond suit"], + [8194, "en space"], [8195, "em space"], [8201, "thin space"], + [8204, "zero width non-joiner"], [8205, "zero width joiner"], + [8206, "left-to-right mark"], [8207, "right-to-left mark"] + ]; + + // The markup that is kept, the same as the HTML Purifier allowlist in + // lib/purify.inc.php. Other tags are removed and their contents kept. + var ALLOWED = { + P: ["style", "align"], BR: [], STRONG: [], B: [], EM: [], I: [], U: [], SUP: [], SUB: [], + HR: [], PRE: [], CODE: [], BLOCKQUOTE: ["style"], DIV: ["style", "align"], SPAN: ["style"], + UL: [], OL: [], LI: [], A: ["href", "title"] + }; + var RENAME = { B: "STRONG", I: "EM" }; + var DROP = { SCRIPT: 1, STYLE: 1, TEMPLATE: 1, IFRAME: 1, OBJECT: 1, EMBED: 1, HEAD: 1, TITLE: 1, META: 1, LINK: 1 }; + var STYLES = ["text-align", "padding-left", "margin-left"]; + var BLOCK = /^(P|DIV|LI|PRE|BLOCKQUOTE|UL|OL|HR|H[1-6])$/; + var VOID = { BR: 1, HR: 1 }; + + function icon(name) { + var spec = ICONS[name]; + var svg = document.createElementNS(SVG_NS, "svg"); + svg.setAttribute("viewBox", "0 0 " + (spec.box || 16) + " " + (spec.box || 16)); + svg.setAttribute("width", "16"); + svg.setAttribute("height", "16"); + svg.setAttribute("aria-hidden", "true"); + svg.setAttribute("focusable", "false"); + if (spec.fill) { + svg.setAttribute("fill", "currentColor"); + svg.setAttribute("fill-rule", "evenodd"); + } else { + svg.setAttribute("fill", "none"); + svg.setAttribute("stroke", "currentColor"); + svg.setAttribute("stroke-width", String(spec.width || 2.5)); + svg.setAttribute("stroke-linecap", "round"); + svg.setAttribute("stroke-linejoin", "round"); + } + (spec.fill || spec.stroke).forEach(function (d) { + var path = document.createElementNS(SVG_NS, "path"); + path.setAttribute("d", d); + svg.appendChild(path); + }); + return svg; + } + + function el(tag, className, text) { + var node = document.createElement(tag); + if (className) node.className = className; + if (text !== undefined) node.textContent = text; + return node; + } + + function safeUrl(url) { + url = String(url || "").trim(); + // Relative links, and only these schemes + return /^(https?:|mailto:|[\/#?.]|[^:]*$)/i.test(url) ? url : ""; + } + + // Keep only the allowed properties of a style attribute + function cleanStyle(style) { + var out = []; + String(style || "").split(";").forEach(function (rule) { + var i = rule.indexOf(":"); + if (i < 0) return; + var name = rule.slice(0, i).trim().toLowerCase(); + var value = rule.slice(i + 1).trim(); + if (STYLES.indexOf(name) >= 0 && /^[\w .%-]+$/.test(value)) out.push(name + ": " + value + ";"); + }); + return out.join(" "); + } + + /* + * Copy the allowed markup from *source* into *target*. The source nodes + * come from an inert document (DOMParser), so nothing in them runs. + */ + function cleanInto(source, target) { + Array.prototype.forEach.call(source.childNodes, function (node) { + if (node.nodeType === 3) { + target.appendChild(document.createTextNode(node.nodeValue)); + return; + } + if (node.nodeType !== 1 || DROP[node.nodeName]) return; + var name = node.nodeName; + if (/^H[1-6]$/.test(name)) name = "P"; + if (!ALLOWED[name]) { + cleanInto(node, target); + return; + } + var copy = document.createElement(RENAME[name] || name); + ALLOWED[name].forEach(function (attr) { + var value = node.getAttribute(attr); + if (value === null) return; + if (attr === "style") value = cleanStyle(value); + if (attr === "href") value = safeUrl(value); + if (attr === "align" && !/^(left|right|center|justify)$/i.test(value)) value = ""; + if (value) copy.setAttribute(attr, value); + }); + // A span with no style left is just its contents + if (name === "SPAN" && !copy.hasAttribute("style")) { + cleanInto(node, target); + return; + } + cleanInto(node, copy); + target.appendChild(copy); + }); + return target; + } + + function parse(html) { + var doc = new DOMParser().parseFromString("" + String(html || "") + "", "text/html"); + return cleanInto(doc.body, document.createDocumentFragment()); + } + + function escapeText(text) { + return text.replace(/&/g, "&").replace(//g, ">").replace(/\u00a0/g, " "); + } + + function escapeAttr(text) { + return escapeText(text).replace(/"/g, """); + } + + function isEmptyBlock(node) { + return !node.textContent.replace(/[\s\u00a0\u200b]/g, "") && !node.querySelector("hr"); + } + + /* + * The HTML for the textarea, written the way TinyMCE wrote it: + * and , one block per line, "
", and " " in an empty + * paragraph. An editor with no words in it gives "". + */ + function serialize(root) { + function inner(node, depth) { + var html = ""; + Array.prototype.forEach.call(node.childNodes, function (child) { + html += outer(child, depth); + }); + return html; + } + function outer(node, depth) { + if (node.nodeType === 3) { + // Whitespace between blocks is only layout + if (depth === 0 && !node.nodeValue.trim()) return ""; + return escapeText(node.nodeValue); + } + if (node.nodeType !== 1) return ""; + var name = RENAME[node.nodeName] || node.nodeName; + if (!ALLOWED[name]) return inner(node, depth); + // Chrome can leave a behind; keep only allowed styles + var attrs = ""; + (ALLOWED[name] || []).forEach(function (attr) { + var value = node.getAttribute(attr); + if (attr === "style") value = cleanStyle(value); + if (attr === "href") value = safeUrl(value); + if (value) attrs += " " + attr + '="' + escapeAttr(value) + '"'; + }); + if (name === "SPAN" && !attrs) return inner(node, depth); + var tag = name.toLowerCase(); + if (VOID[name]) return "<" + tag + attrs + " />"; + var block = BLOCK.test(name); + var body; + if (/^(P|DIV|LI|PRE)$/.test(name) && isEmptyBlock(node)) { + body = " "; + } else { + body = inner(node, /^(BLOCKQUOTE|UL|OL)$/.test(name) ? 0 : depth + 1); + // A trailing
that the browser keeps to hold the caret + if (block) body = body.replace(/
$/, ""); + } + if (/^(BLOCKQUOTE|UL|OL)$/.test(name)) body = "\n" + body; + return "<" + tag + attrs + ">" + body + "" + (block ? "\n" : ""); + } + if (isEmptyBlock(root)) return ""; + return inner(root, 0).trim(); + } + + function attach(textarea) { + var wrapper = el("div", "xed"); + var box = el("div", "xed-area"); + box.contentEditable = "true"; + box.spellcheck = true; + box.setAttribute("role", "textbox"); + box.setAttribute("aria-multiline", "true"); + var label = textarea.id && document.querySelector('label[for="' + textarea.id + '"]'); + box.setAttribute("aria-label", label ? label.textContent.trim() : "Story"); + var toolbar = el("div", "xed-toolbar"); + toolbar.setAttribute("role", "toolbar"); + toolbar.setAttribute("aria-label", "Formatting"); + + var buttons = {}; + var undoStack = []; + var redoStack = []; + var lastInput = { time: 0, type: "" }; + var savedRange = null; + + // Paragraphs are the default block, as in TinyMCE + try { document.execCommand("defaultParagraphSeparator", false, "p"); } catch (e) { } + + /* ---------- content ---------- */ + + function sync() { + var html = serialize(box); + if (textarea.value !== html) { + textarea.value = html; + textarea.dispatchEvent(new Event("input", { bubbles: true })); + } + } + + // Put loose text at the top level into paragraphs, and keep one empty + // paragraph in an empty editor so that typing starts in a

+ function tidy() { + var run = null; + var moved = false; + var range = currentRange(); + var where = range && [range.startContainer, range.startOffset, range.endContainer, range.endOffset]; + Array.prototype.slice.call(box.childNodes).forEach(function (node) { + var inline = node.nodeType === 3 ? !!(node.nodeValue.trim() || run) : node.nodeType === 1 && !BLOCK.test(node.nodeName); + if (inline) { + if (!run) { + run = document.createElement("p"); + box.insertBefore(run, node); + } + run.appendChild(node); + moved = true; + } else { + run = null; + } + }); + if (!box.firstElementChild) { + box.textContent = ""; + var p = emptyParagraph(); + box.appendChild(p); + if (where) where = [p, 0, p, 0]; + moved = true; + } + // Moving a node loses a selection inside it; put the selection back + if (moved && where && box.contains(where[0]) && box.contains(where[2])) { + try { + var again = document.createRange(); + again.setStart(where[0], where[1]); + again.setEnd(where[2], where[3]); + selectRange(again); + } catch (e) { } + } + } + + function emptyParagraph() { + var p = document.createElement("p"); + p.appendChild(document.createElement("br")); + return p; + } + + function setContent(html) { + box.textContent = ""; + box.appendChild(parse(html)); + // " " in an empty paragraph becomes a
that holds the caret + Array.prototype.forEach.call(box.querySelectorAll("p, div, li"), function (block) { + if (isEmptyBlock(block) && !block.querySelector("br")) { + block.textContent = ""; + block.appendChild(document.createElement("br")); + } + }); + tidy(); + sync(); + } + + /* ---------- selection ---------- */ + + function currentRange() { + var selection = window.getSelection(); + if (!selection || !selection.rangeCount) return null; + var range = selection.getRangeAt(0); + return box.contains(range.commonAncestorContainer) ? range : null; + } + + function selectRange(range) { + var selection = window.getSelection(); + selection.removeAllRanges(); + selection.addRange(range); + } + + function pathTo(node) { + var path = []; + while (node && node !== box) { + path.unshift(Array.prototype.indexOf.call(node.parentNode.childNodes, node)); + node = node.parentNode; + } + return node === box ? path : null; + } + + function nodeAt(path) { + var node = box; + for (var i = 0; node && i < path.length; i++) node = node.childNodes[path[i]]; + return node; + } + + function snapshot() { + var range = currentRange(); + var shot = { html: box.innerHTML, range: null }; + if (range) { + shot.range = [pathTo(range.startContainer), range.startOffset, pathTo(range.endContainer), range.endOffset]; + } + return shot; + } + + function restore(shot) { + box.innerHTML = shot.html; + if (shot.range && shot.range[0] && shot.range[2]) { + var start = nodeAt(shot.range[0]); + var end = nodeAt(shot.range[2]); + if (start && end) { + try { + var range = document.createRange(); + range.setStart(start, shot.range[1]); + range.setEnd(end, shot.range[3]); + box.focus(); + selectRange(range); + } catch (e) { } + } + } + sync(); + refresh(); + } + + /* ---------- undo ---------- */ + + // Keep the state from before a change. Typing is kept as one step until + // the kind of input changes or there is a pause. + function remember(kind) { + var now = Date.now(); + if (kind && kind === lastInput.type && now - lastInput.time < 1000) { + lastInput.time = now; + return; + } + lastInput = { time: now, type: kind || "" }; + var shot = snapshot(); + if (undoStack.length && undoStack[undoStack.length - 1].html === shot.html) return; + undoStack.push(shot); + if (undoStack.length > 100) undoStack.shift(); + redoStack = []; + } + + function undo() { + if (!undoStack.length) return; + redoStack.push(snapshot()); + restore(undoStack.pop()); + lastInput = { time: 0, type: "" }; + } + + function redo() { + if (!redoStack.length) return; + undoStack.push(snapshot()); + restore(redoStack.pop()); + lastInput = { time: 0, type: "" }; + } + + /* ---------- blocks ---------- */ + + function closest(node, test) { + while (node && node !== box) { + if (node.nodeType === 1 && test(node)) return node; + node = node.parentNode; + } + return null; + } + + function closestTag(node, pattern) { + return closest(node, function (n) { return pattern.test(n.nodeName); }); + } + + // The innermost text blocks that the selection touches + function selectedBlocks() { + tidy(); + var range = currentRange(); + if (!range) return []; + var blocks = []; + Array.prototype.forEach.call(box.querySelectorAll("p, div, li, pre, blockquote"), function (block) { + if (block.nodeName === "BLOCKQUOTE" && block.querySelector("p, div, li, pre")) return; + if (range.intersectsNode(block)) blocks.push(block); + }); + if (!blocks.length) { + var block = closestTag(range.startContainer, /^(P|DIV|LI|PRE|BLOCKQUOTE)$/); + if (block) blocks.push(block); + } + return blocks; + } + + function align(value) { + var blocks = selectedBlocks(); + if (!blocks.length) return; + // Pressing the alignment that is already set removes it, as in TinyMCE + var on = blocks.every(function (b) { return b.style.textAlign === value; }); + blocks.forEach(function (b) { + b.removeAttribute("align"); + b.style.textAlign = on ? "" : value; + if (!b.getAttribute("style")) b.removeAttribute("style"); + }); + } + + function indent(step) { + var range = currentRange(); + if (range && closestTag(range.startContainer, /^LI$/)) { + document.execCommand(step > 0 ? "indent" : "outdent", false, null); + return; + } + selectedBlocks().forEach(function (b) { + var now = parseInt(b.style.paddingLeft, 10) || 0; + var next = Math.max(0, now + step); + b.style.paddingLeft = next ? next + "px" : ""; + if (!b.getAttribute("style")) b.removeAttribute("style"); + }); + } + + // The ancestor of *node* that is a direct child of *parent* + function childOf(parent, node) { + while (node && node.parentNode !== parent) node = node.parentNode; + return node; + } + + function previousElement(node) { + node = node.previousSibling; + while (node && node.nodeType === 3 && !node.nodeValue.trim()) node = node.previousSibling; + return node; + } + + function unwrap(node) { + while (node.firstChild) node.parentNode.insertBefore(node.firstChild, node); + node.parentNode.removeChild(node); + } + + // Wrap the selected blocks in a

, or take them out of one + function blockquote() { + var range = currentRange(); + var blocks = selectedBlocks(); + if (!range || !blocks.length) return; + var saved = [range.startContainer, range.startOffset, range.endContainer, range.endOffset]; + var quotes = blocks.map(function (b) { return closestTag(b, /^BLOCKQUOTE$/); }); + if (quotes.every(Boolean)) { + quotes.filter(function (q, i) { return quotes.indexOf(q) === i; }).forEach(function (quote) { + if (!quote.querySelector("p, div, li, pre")) { + var p = document.createElement("p"); + while (quote.firstChild) p.appendChild(quote.firstChild); + quote.appendChild(p); + } + unwrap(quote); + }); + } else { + var tops = []; + blocks.forEach(function (b) { + var top = childOf(box, b); + if (top && tops.indexOf(top) < 0) tops.push(top); + }); + var quote = null; + tops.forEach(function (top) { + if (!quote || previousElement(top) !== quote) { + quote = document.createElement("blockquote"); + box.insertBefore(quote, top); + } + if (top.nodeName === "BLOCKQUOTE") { + while (top.firstChild) quote.appendChild(top.firstChild); + top.parentNode.removeChild(top); + } else { + quote.appendChild(top); + } + }); + } + try { + var again = document.createRange(); + again.setStart(saved[0], saved[1]); + again.setEnd(saved[2], saved[3]); + selectRange(again); + } catch (e) { } + } + + /* ---------- links ---------- */ + + function linkAt(range) { + if (!range) return null; + var a = closestTag(range.startContainer, /^A$/); + if (a) return a; + // A selection of exactly one link + var links = box.querySelectorAll("a"); + for (var i = 0; i < links.length; i++) { + if (range.intersectsNode(links[i])) return links[i]; + } + return null; + } + + function linkDialog() { + var range = currentRange(); + savedRange = range ? range.cloneRange() : null; + var link = linkAt(range); + var text = link ? link.textContent : (range ? range.toString() : ""); + var fields = [ + { name: "href", label: "Url", value: link ? link.getAttribute("href") : "" }, + { name: "text", label: "Text to display", value: text }, + { name: "title", label: "Title", value: link ? link.getAttribute("title") || "" : "" } + ]; + var form = el("div", "xed-form"); + var inputs = {}; + fields.forEach(function (field) { + var row = el("div", "xed-row"); + var id = "xed-" + field.name + "-" + Math.random().toString(36).slice(2); + var lab = el("label", "", field.label); + lab.htmlFor = id; + var input = el("input", "xed-textbox"); + input.type = "text"; + input.id = id; + input.value = field.value; + inputs[field.name] = input; + row.appendChild(lab); + row.appendChild(input); + form.appendChild(row); + }); + // A selection with markup in it keeps its markup unless the text changes + var textWas = inputs.text.value; + openDialog("Insert link", form, [ + { text: "Ok", primary: true, action: function () { + var href = inputs.href.value.trim(); + if (/^www\./i.test(href)) href = "http://" + href; + else if (/^[^\s:\/@]+@[^\s:\/@]+\.[^\s:\/@]+$/.test(href)) href = "mailto:" + href; + href = safeUrl(href); + restoreSelection(); + remember(); + if (!href) { + if (link) unwrap(link); + } else if (link) { + link.setAttribute("href", href); + setTitle(link, inputs.title.value); + if (inputs.text.value !== textWas) link.textContent = inputs.text.value || href; + } else { + insertLink(href, inputs.title.value, inputs.text.value, inputs.text.value !== textWas); + } + changed(); + } }, + { text: "Cancel" } + ], inputs.href); + } + + function setTitle(link, title) { + if (title.trim()) link.setAttribute("title", title.trim()); + else link.removeAttribute("title"); + } + + function insertLink(href, title, text, textChanged) { + var range = currentRange(); + if (!range) return; + if (range.collapsed || textChanged) { + var a = document.createElement("a"); + a.setAttribute("href", href); + setTitle(a, title); + a.textContent = text || href; + range.deleteContents(); + range.insertNode(a); + var after = document.createRange(); + after.setStartAfter(a); + selectRange(after); + } else { + var before = Array.prototype.slice.call(box.querySelectorAll("a")); + document.execCommand("createLink", false, href); + Array.prototype.forEach.call(box.querySelectorAll("a"), function (a) { + if (before.indexOf(a) < 0) setTitle(a, title); + }); + } + } + + function unlink() { + var range = currentRange(); + var link = linkAt(range); + if (range && range.collapsed && link) { + unwrap(link); + } else { + document.execCommand("unlink", false, null); + } + } + + /* ---------- special characters ---------- */ + + function charmapDialog() { + var range = currentRange(); + savedRange = range ? range.cloneRange() : null; + var body = el("div", "xed-charmap-body"); + var table = el("table", "xed-charmap"); + var preview = el("div", "xed-charmap-preview"); + var big = el("div", "xed-charmap-char", ""); + var name = el("div", "xed-charmap-name", ""); + preview.appendChild(big); + preview.appendChild(name); + var row = null; + var dialog; + CHARMAP.forEach(function (entry, i) { + if (i % 25 === 0) row = table.insertRow(); + var cell = row.insertCell(); + var character = String.fromCharCode(entry[0]); + cell.textContent = character; + cell.title = entry[1]; + cell.tabIndex = 0; + cell.addEventListener("mouseover", function () { + big.textContent = character; + name.textContent = entry[1]; + }); + function choose() { + dialog.close(); + restoreSelection(); + remember(); + document.execCommand("insertText", false, character); + changed(); + } + cell.addEventListener("click", choose); + cell.addEventListener("keydown", function (event) { + if (event.key === "Enter" || event.key === " ") { + event.preventDefault(); + choose(); + } + }); + }); + body.appendChild(table); + body.appendChild(preview); + dialog = openDialog("Special character", body, [{ text: "Close" }]); + } + + /* ---------- source code ---------- */ + + function codeDialog() { + var source = el("textarea", "xed-source"); + source.value = serialize(box); + source.spellcheck = false; + openDialog("Source code", source, [ + { text: "Ok", primary: true, action: function () { + remember(); + setContent(source.value); + box.focus(); + changed(); + } }, + { text: "Cancel" } + ], source, "xed-window-code"); + } + + function restoreSelection() { + box.focus(); + if (savedRange) selectRange(savedRange); + savedRange = null; + } + + /* ---------- dialogs ---------- */ + + // A modal window in the style of the TinyMCE skin + function openDialog(title, content, actions, focus, extraClass) { + var block = el("div", "xed-modal-block"); + var win = el("div", "xed-window" + (extraClass ? " " + extraClass : "")); + win.setAttribute("role", "dialog"); + win.setAttribute("aria-modal", "true"); + var head = el("div", "xed-window-head"); + var heading = el("div", "xed-title", title); + heading.id = "xed-title-" + Math.random().toString(36).slice(2); + win.setAttribute("aria-labelledby", heading.id); + var close = el("button", "xed-close", "\u00d7"); + close.type = "button"; + close.setAttribute("aria-label", "Close"); + head.appendChild(heading); + head.appendChild(close); + var body = el("div", "xed-window-body"); + body.appendChild(content); + var foot = el("div", "xed-foot"); + var dialog = { + close: function () { + document.removeEventListener("keydown", onKey, true); + block.parentNode.removeChild(block); + win.parentNode.removeChild(win); + } + }; + function cancel() { + dialog.close(); + restoreSelection(); + } + actions.forEach(function (action) { + var button = el("button", "xed-button" + (action.primary ? " xed-primary" : ""), action.text); + button.type = "button"; + button.addEventListener("click", function () { + if (action.action) { + dialog.close(); + action.action(); + } else { + cancel(); + } + }); + foot.appendChild(button); + }); + close.addEventListener("click", cancel); + function onKey(event) { + if (event.key === "Escape") { + event.preventDefault(); + cancel(); + } else if (event.key === "Enter" && event.target.nodeName === "INPUT") { + event.preventDefault(); + var primary = foot.querySelector(".xed-primary"); + if (primary) primary.click(); + } else if (event.key === "Tab") { + // Keep the focus inside the window + var items = Array.prototype.filter.call(win.querySelectorAll("button, input, textarea, [tabindex]"), function (n) { + return n.tabIndex >= 0; + }); + var first = items[0]; + var last = items[items.length - 1]; + if (event.shiftKey && document.activeElement === first) { + event.preventDefault(); + last.focus(); + } else if (!event.shiftKey && document.activeElement === last) { + event.preventDefault(); + first.focus(); + } + } + } + document.addEventListener("keydown", onKey, true); + win.appendChild(head); + win.appendChild(body); + win.appendChild(foot); + document.body.appendChild(block); + document.body.appendChild(win); + (focus || foot.querySelector("button")).focus(); + return dialog; + } + + /* ---------- toolbar ---------- */ + + function run(command) { + if (command === "link") return linkDialog(); + if (command === "charmap") return charmapDialog(); + if (command === "code") return codeDialog(); + box.focus(); + if (!currentRange()) { + // No caret yet: start at the end + var range = document.createRange(); + range.selectNodeContents(box.lastChild || box); + range.collapse(false); + selectRange(range); + } + remember(); + if (command === "bold" || command === "italic") { + document.execCommand("styleWithCSS", false, false); + document.execCommand(command, false, null); + } else if (ALIGN[command]) { + align(ALIGN[command]); + } else if (command === "indent") { + indent(INDENT_STEP); + } else if (command === "outdent") { + indent(-INDENT_STEP); + } else if (command === "blockquote") { + blockquote(); + } else if (command === "unlink") { + unlink(); + } + changed(); + } + + function isActive(command, range) { + var node = range.startContainer; + if (command === "bold" || command === "italic") { + try { + return document.queryCommandState(command); + } catch (e) { + return !!closestTag(node, command === "bold" ? /^(STRONG|B)$/ : /^(EM|I)$/); + } + } + if (ALIGN[command]) { + var block = closestTag(node, /^(P|DIV|LI|PRE|BLOCKQUOTE)$/); + return !!block && (block.style.textAlign || (block.getAttribute("align") || "").toLowerCase()) === ALIGN[command]; + } + if (command === "blockquote") return !!closestTag(node, /^BLOCKQUOTE$/); + if (command === "link") return !!closestTag(node, /^A$/); + return false; + } + + // Show which formats apply where the caret is + function refresh() { + var range = document.activeElement === box ? currentRange() : null; + Object.keys(buttons).forEach(function (command) { + var on = !!range && isActive(command, range); + buttons[command].classList.toggle("xed-active", on); + if (buttons[command].hasAttribute("aria-pressed")) buttons[command].setAttribute("aria-pressed", on ? "true" : "false"); + }); + } + + function changed() { + tidy(); + sync(); + refresh(); + } + + TOOLBAR.forEach(function (group) { + var node = el("div", "xed-group"); + group.forEach(function (spec) { + var button = el("button", "xed-btn"); + button.type = "button"; + button.title = spec.title + (spec.key ? " (Ctrl+" + spec.key.toUpperCase() + ")" : ""); + button.setAttribute("aria-label", spec.title); + if (/^(bold|italic|align|blockquote)/.test(spec.command)) button.setAttribute("aria-pressed", "false"); + button.appendChild(icon(spec.command)); + // Keep the selection in the editor when the button is pressed + button.addEventListener("mousedown", function (event) { event.preventDefault(); }); + button.addEventListener("click", function () { run(spec.command); }); + buttons[spec.command] = button; + node.appendChild(button); + }); + toolbar.appendChild(node); + }); + + /* ---------- events ---------- */ + + box.addEventListener("beforeinput", function (event) { + if (event.inputType === "historyUndo") { + event.preventDefault(); + undo(); + } else if (event.inputType === "historyRedo") { + event.preventDefault(); + redo(); + } else { + remember(event.inputType); + } + }); + + box.addEventListener("input", function (event) { + // After everything is deleted, start again with a plain paragraph, so + // that the formatting of the deleted text does not carry on + if (/^delete/.test(event.inputType || "") && isEmptyBlock(box) && !box.querySelector("li")) { + box.textContent = ""; + var p = emptyParagraph(); + box.appendChild(p); + var range = document.createRange(); + range.setStart(p, 0); + range.collapse(true); + selectRange(range); + } + changed(); + }); + + box.addEventListener("keydown", function (event) { + if (!(event.ctrlKey || event.metaKey) || event.altKey) return; + var key = event.key.toLowerCase(); + if (key === "z" && !event.shiftKey) { + event.preventDefault(); + undo(); + } else if (key === "y" || (key === "z" && event.shiftKey)) { + event.preventDefault(); + redo(); + } else { + TOOLBAR.forEach(function (group) { + group.forEach(function (spec) { + if (spec.key === key && !event.shiftKey) { + event.preventDefault(); + run(spec.command); + } + }); + }); + } + }); + + // Paste the text and its simple formatting, not the styles of the page + // it came from + box.addEventListener("paste", function (event) { + var data = event.clipboardData || window.clipboardData; + if (!data) return; + event.preventDefault(); + remember(); + var html = data.getData("text/html"); + if (html) { + var holder = document.createElement("div"); + holder.appendChild(parse(html)); + document.execCommand("insertHTML", false, holder.innerHTML); + } else { + // A blank line starts a new paragraph; a single new line is a line break + var text = data.getData("text/plain").replace(/\r\n?/g, "\n"); + text.split(/\n[ \t]*\n\s*/).forEach(function (para, i) { + if (i) document.execCommand("insertParagraph", false, null); + para.split("\n").forEach(function (line, j) { + if (j) document.execCommand("insertLineBreak", false, null); + if (line) document.execCommand("insertText", false, line); + }); + }); + } + changed(); + }); + + box.addEventListener("focus", refresh); + box.addEventListener("blur", function () { + sync(); + refresh(); + }); + document.addEventListener("selectionchange", refresh); + + // The textarea keeps its place in the form, hidden behind the editor + textarea.parentNode.insertBefore(wrapper, textarea); + wrapper.appendChild(toolbar); + wrapper.appendChild(box); + wrapper.appendChild(textarea); + // The site style sets display on #story, which beats the hidden attribute + textarea.hidden = true; + textarea.style.display = "none"; + setContent(textarea.value); + if (textarea.form) textarea.form.addEventListener("submit", sync); + + return { + getContent: function () { return serialize(box); }, + setContent: function (html) { setContent(html); }, + focus: function () { box.focus(); } + }; + } + + return { attach: attach, serialize: serialize, parse: parse }; +})(); diff --git a/publish/index.php b/publish/index.php index 10acb40..20b94e3 100644 --- a/publish/index.php +++ b/publish/index.php @@ -17,7 +17,7 @@ require_once("../session.lib.php"); - + diff --git a/publish/tinymce_init.inc.php b/publish/tinymce_init.inc.php deleted file mode 100644 index e0f964a..0000000 --- a/publish/tinymce_init.inc.php +++ /dev/null @@ -1,38 +0,0 @@ - - - diff --git a/publish/utilities.js b/publish/utilities.js index b5121aa..0af702b 100644 --- a/publish/utilities.js +++ b/publish/utilities.js @@ -1,6 +1,3 @@ -// GLOBAL -var tinyMCEstate = true; - function showHide(show) { if (show == 'text') { var hide = 'upload'; @@ -14,18 +11,9 @@ function showHide(show) { document.getElementById(hide+'parent').style.display = "none"; document.getElementById(show+'parent').style.display = "block"; document.getElementById('wordcounter').style.display = "block"; - if (!tinyMCEstate && tinyMCE) { - // Toggling breaks getContent if the inital state is toggled off. - //tinyMCE.execCommand('mceToggleEditor',false,'text'); - tinyMCEstate = true; - } - tinyMCE.execCommand('mceFocus',false,'text'); + if (window.storyEditor) + storyEditor.focus(); } else if (show == 'upload') { - if (tinyMCEstate && tinyMCE) { - // Toggling breaks getContent if the inital state is toggled off. - //tinyMCE.execCommand('mceToggleEditor',false,'text'); - tinyMCEstate = false; - } document.getElementById('wordcounter').style.display = "none"; document.getElementById(hide+'parent').style.display = "none"; document.getElementById(show+'parent').style.display = "block"; @@ -52,7 +40,7 @@ function review() { var upload = document.getElementById('upload'); var uploaded = document.getElementById('uploaded'); var remove_img = document.getElementById('remove_img'); - var txtcnt = wc(tinyMCE.get('story').getContent()); + var txtcnt = wc(document.getElementById('story').value); if (is_delete) return true; if (!title.value) { alert("Please add a title to your submission; one makes everything much prettier."); @@ -92,20 +80,20 @@ function toggle_remove() { } } -function mceWordCount (e) { - if (e && e.type != 'keyup') - return true; - var txt = tinyMCE.get('story').getContent(); +// Show the number of words in the story (publish/editor.inc.php calls +// this when the story changes) +function updateWordCount() { + var story = document.getElementById("story"); var wordcounter = document.getElementById("wordcounter"); - var cnt = wc(txt); + if (!story || !wordcounter) + return true; + var cnt = wc(story.value); var words = (cnt == 1) ? " word" : " words"; - if (wordcounter) { - wordcounter.innerHTML = cnt + words; - wordcounter.className = "counter"; - if (cnt == 100) wordcounter.className += " yes"; - if (cnt > 100) wordcounter.className += " no"; - } - return true; + wordcounter.innerHTML = cnt + words; + wordcounter.className = "counter"; + if (cnt == 100) wordcounter.className += " yes"; + if (cnt > 100) wordcounter.className += " no"; + return true; } function wc (txt) { @@ -115,7 +103,7 @@ function wc (txt) { txt = txt.replace(/\s[^a-zA-Z0-9]+\s/g," "); //strip punctuation txt = txt.replace(/\s*((\S+\s*)*)/, "$1"); //ltrim txt = txt.replace(/((\s*\S+)*)\s*/, "$1"); //rtrim - txt = txt.replace(/( )/g, " "); //TinyMCE newlines leave spaces behind + txt = txt.replace(/( )/g, " "); //empty paragraphs and non-breaking spaces txt = txt.replace(/(^\s+|\s+$)/, " "); // Remove trailing spaces if (txt.match(/^ *$/)) return 0; diff --git a/tinymce b/tinymce deleted file mode 120000 index 2c81580..0000000 --- a/tinymce +++ /dev/null @@ -1 +0,0 @@ -tinymce-4.2.8/ \ No newline at end of file diff --git a/tinymce-4.2.8/LICENSE.TXT b/tinymce-4.2.8/LICENSE.TXT deleted file mode 100644 index 1837b0a..0000000 --- a/tinymce-4.2.8/LICENSE.TXT +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/tinymce-4.2.8/changelog.txt b/tinymce-4.2.8/changelog.txt deleted file mode 100644 index a6d2073..0000000 --- a/tinymce-4.2.8/changelog.txt +++ /dev/null @@ -1,883 +0,0 @@ -Version 4.2.8 (2015-11-13) - Fixed bug where it was possible to delete tables as the inline root element if all columns where selected. - Fixed bug where the UI buttons active state wasn't properly updated due to recent refactoring of that logic. -Version 4.2.7 (2015-10-27) - Fixed bug where backspace/delete would remove all formats on the last paragraph character in WebKit/Blink. - Fixed bug where backspace within a inline format element with a bogus caret container would move the caret. - Fixed bug where backspace/delete on selected table cells wouldn't add an undo level. - Fixed bug where script tags embedded within the editor could sometimes get a mce- prefix prepended to them - Fixed bug where validate: false option could produce an error to be thrown from the Serialization step. - Fixed bug where inline editing of a table as the root element could let the user delete that table. - Fixed bug where inline editing of a table as the root element wouldn't properly handle enter key. - Fixed bug where inline editing of a table as the root element would normalize the selection incorrectly. - Fixed bug where inline editing of a list as the root element could let the user delete that list. - Fixed bug where inline editing of a list as the root element could let the user split that list. - Fixed bug where resize handles would be rendered on editable root elements such as table. -Version 4.2.6 (2015-09-28) - Added capability to set request headers when using XHRs. - Added capability to upload local images automatically default delay is set to 30 seconds after editing images. - Added commands ids mceEditImage, mceAchor and mceMedia to be avaiable from execCommand. - Added Edge browser to saucelabs grunt task. Patch contributed by John-David Dalton. - Fixed bug where blob uris not produced by tinymce would produce HTML invalid markup. - Fixed bug where selection of contents of a nearly empty editor in Edge would sometimes fail. - Fixed bug where color styles woudln't be retained on copy/paste in Blink/Webkit. - Fixed bug where the table plugin would throw an error when inserting rows after a child table. - Fixed bug where the template plugin wouldn't handle functions as variable replacements. - Fixed bug where undo/redo sometimes wouldn't work properly when applying formatting collapsed ranges. - Fixed bug where shift+delete wouldn't do a cut operation on Blink/WebKit. - Fixed bug where cut action wouldn't properly store the before selection bookmark for the undo level. - Fixed bug where backspace in side an empty list element on IE would loose editor focus. - Fixed bug where the save plugin wouldn't enable the buttons when a change occured. - Fixed bug where Edge wouldn't initialize the editor if a document.domain was specified. - Fixed bug where enter key before nested images would sometimes not properly expand the previous block. - Fixed bug where the inline toolbars wouldn't get properly hidden when blurring the editor instance. - Fixed bug where Edge would paste Chinese characters on some Windows 10 installations. - Fixed bug where IME would loose focus on IE 11 due to the double trailing br bug fix. - Fixed bug where the proxy url in imagetools was incorrect. Patch contributed by Wong Ho Wang. -Version 4.2.5 (2015-08-31) - Added fullscreen capability to embedded youtube and vimeo videos. - Fixed bug where the uploadImages call didn't work on IE 10. - Fixed bug where image place holders would be uploaded by uploadImages call. - Fixed bug where images marked with bogus would be uploaded by the uploadImages call. - Fixed bug where multiple calls to uploadImages would result in decreased performance. - Fixed bug where pagebreaks were editable to imagetools patch contributed by Rasmus Wallin. - Fixed bug where the element path could cause too much recursion exception. - Fixed bug for domains containing ".min". Patch contributed by Loïc Février. - Fixed so validation of external links to accept a number after www. Patch contributed by Victor Carvalho. - Fixed so the charmap is exposed though execCommand. Patch contributed by Matthew Will. - Fixed so that the image uploads are concurrent for improved performance. - Fixed various grammar problems in inline documentation. Patches provided by nikolas. -Version 4.2.4 (2015-08-17) - Added picture as a valid element to the HTML 5 schema. Patch contributed by Adam Taylor. - Fixed bug where contents would be duplicated on drag/drop within the same editor. - Fixed bug where floating/alignment of images on Edge wouldn't work properly. - Fixed bug where it wasn't possible to drag images on IE 11. - Fixed bug where image selection on Edge would sometimes fail. - Fixed bug where contextual toolbars icons wasn't rendered properly when using the toolbar_items_size. - Fixed bug where searchreplace dialog doesn't get prefilled with the selected text. - Fixed bug where fragmented matches wouldn't get properly replaced by the searchreplace plugin. - Fixed bug where enter key wouldn't place the caret if was after a trailing space within an inline element. - Fixed bug where the autolink plugin could produce multiple links for the same text on Gecko. - Fixed bug where EditorUpload could sometimes throw an exception if the blob wasn't found. - Fixed xss issues with media plugin not properly filtering out some script attributes. -Version 4.2.3 (2015-07-30) - Fixed bug where image selection wasn't possible on Edge due to incompatible setBaseAndExtend API. - Fixed bug where image blobs urls where not properly destroyed by the imagetools plugin. - Fixed bug where keyboard shortcuts wasn't working correctly on IE 8. - Fixed skin issue where the borders of panels where not visible on IE 8. -Version 4.2.2 (2015-07-22) - Fixed bug where float panels were not being hidden on inline editor blur when fixed_toolbar_container config option was in use. - Fixed bug where combobox states wasn't properly updated if contents where updated without keyboard. - Fixed bug where pasting into textbox or combobox would move the caret to the end of text. - Fixed bug where removal of bogus span elements before block elements would remove whitespace between nodes. - Fixed bug where repositioning of inline toolbars where async and producing errors if the editor was removed from DOM to early. Patch by iseulde. - Fixed bug where element path wasn't working correctly. Patch contributed by iseulde. - Fixed bug where menus wasn't rendered correctly when custom images where added to a menu. Patch contributed by Naim Hammadi. -Version 4.2.1 (2015-06-29) - Fixed bug where back/forward buttons in the browser would render blob images as broken images. - Fixed bug where Firefox would throw regexp to big error when replacing huge base64 chunks. - Fixed bug rendering issues with resize and context toolbars not being placed properly until next animation frame. - Fixed bug where the rendering of the image while cropping would some times not be centered correctly. - Fixed bug where listbox items with submenus would me selected as active. - Fixed bug where context menu where throwing an error when rendering. - Fixed bug where resize both option wasn't working due to resent addClass API change. Patch contributed by Jogai. - Fixed bug where a hideAll call for container rendered inline toolbars would throw an error. - Fixed bug where onclick event handler on combobox could cause issues if element.id was a function by some polluting libraries. - Fixed bug where listboxes wouldn't get proper selected sub menu item when using link_list or image_list. - Fixed so the UI controls are as wide as 4.1.x to avoid wrapping controls in toolbars. - Fixed so the imagetools dialog is adaptive for smaller screen sizes. -Version 4.2.0 (2015-06-25) - Added new flat default skin to make the UI more modern. - Added new imagetools plugin, lets you crop/resize and apply filters to images. - Added new contextual toolbars support to the API lets you add floating toolbars for specific CSS selectors. - Added new promise feature fill as tinymce.util.Promise. - Added new built in image upload feature lets you upload any base64 encoded image within the editor as files. - Fixed bug where resize handles would appear in the right position in the wrong editor when switching between resizable content in different inline editors. - Fixed bug where tables would not be inserted in inline mode due to previous float panel fix. - Fixed bug where floating panels would remain open when focus was lost on inline editors. - Fixed bug where cut command on Chrome would thrown a browser security exception. - Fixed bug where IE 11 sometimes would report an incorrect size for images in the image dialog. - Fixed bug where it wasn't possible to remove inline formatting at the end of block elements. - Fixed bug where it wasn't possible to delete table cell contents when cell selection was vertical. - Fixed bug where table cell wasn't emptied from block elements if delete/backspace where pressed in empty cell. - Fixed bug where cmd+shift+arrow didn't work correctly on Firefox mac when selecting to start/end of line. - Fixed bug where removal of bogus elements would sometimes remove whitespace between nodes. - Fixed bug where the resize handles wasn't updated when the main window was resized. - Fixed so script elements gets removed by default to prevent possible XSS issues in default config implementations. - Fixed so the UI doesn't need manual reflows when using non native layout managers. - Fixed so base64 encoded images doesn't slow down the editor on modern browsers while editing. - Fixed so all UI elements uses touch events to improve mobile device support. - Removed the touch click quirks patch for iOS since it did more harm than good. - Removed the non proportional resize handles since. Unproportional resize can still be done by holding the shift key. -Version 4.1.10 (2015-05-05) - Fixed bug where plugins loaded with compat3x would sometimes throw errors when loading using the jQuery version. - Fixed bug where extra empty paragraphs would get deleted in WebKit/Blink due to recent Quriks fix. - Fixed bug where the editor wouldn't work properly on IE 12 due to some required browser sniffing. - Fixed bug where formatting shortcut keys where interfering with Mac OS X screenshot keys. - Fixed bug where the caret wouldn't move to the next/previous line boundary on Cmd+Left/Right on Gecko. - Fixed bug where it wasn't possible to remove formats from very specific nested contents. - Fixed bug where undo levels wasn't produced when typing letters using the shift or alt+ctrl modifiers. - Fixed bug where the dirty state wasn't properly updated when typing using the shift or alt+ctrl modifiers. - Fixed bug where an error would be thrown if an autofocused editor was destroyed quickly after its initialization. Patch provided by thorn0. - Fixed issue with dirty state not being properly updated on redo operation. - Fixed issue with entity decoder not handling incorrectly written numeric entities. - Fixed issue where some PI element values wouldn't be properly encoded. -Version 4.1.9 (2015-03-10) - Fixed bug where indentation wouldn't work properly for non list elements. - Fixed bug with image plugin not pulling the image dimensions out correctly if a custom document_base_url was used. - Fixed bug where ctrl+alt+[1-9] would conflict with the AltGr+[1-9] on Windows. New shortcuts is ctrl+shift+[1-9]. - Fixed bug with removing formatting on nodes in inline mode would sometimes include nodes outside the editor body. - Fixed bug where extra nbsp:s would be inserted when you replaced a word surronded by spaces using insertContent. - Fixed bug with pasting from Google Docs would produce extra strong elements and line feeds. -Version 4.1.8 (2015-03-05) - Added new html5 sizes attribute to img elements used together with srcset. - Added new elementpath option that makes it possible to disable the element path but keep the statusbar. - Added new option table_style_by_css for the table plugin to set table styling with css rather than table attributes. - Added new link_assume_external_targets option to prompt the user to prepend http:// prefix if the supplied link does not contain a protocol prefix. - Added new image_prepend_url option to allow a custom base path/url to be added to images. - Added new table_appearance_options option to make it possible to disable some options. - Added new image_title option to make it possible to alter the title of the image, disabled by default. - Fixed bug where selection starting from out side of the body wouldn't produce a proper selection range on IE 11. - Fixed bug where pressing enter twice before a table moves the cursor in the table and causes a javascript error. - Fixed bug where advanced image styles were not respected. - Fixed bug where the less common Shift+Delete didn't produce a proper cut operation on WebKit browsers. - Fixed bug where image/media size constrain logic would produce NaN when handling non number values. - Fixed bug where internal classes where removed by the removeformat command. - Fixed bug with creating links table cell contents with a specific selection would throw a exceptions on WebKit/Blink. - Fixed bug where valid_classes option didn't work as expected according to docs. Patch provided by thorn0. - Fixed bug where jQuery plugin would patch the internal methods multiple times. Patch provided by Drew Martin. - Fixed bug where backspace key wouldn't delete the current selection of newly formatted content. - Fixed bug where type over of inline formatting elements wouldn't properly keep the format on WebKit/Blink. - Fixed bug where selection needed to be properly normalized on modern IE versions. - Fixed bug where Command+Backspace didn't properly delete the whole line of text but the previous word. - Fixed bug where UI active states wheren't properly updated on IE if you placed caret within the current range. - Fixed bug where delete/backspace on WebKit/Blink would remove span elements created by the user. - Fixed bug where delete/backspace would produce incorrect results when deleting between two text blocks with br elements. - Fixed bug where captions where removed when pasting from MS Office. - Fixed bug where lists plugin wouldn't properly remove fully selected nested lists. - Fixed bug where the ttf font used for icons would throw an warning message on Gecko on Mac OS X. - Fixed a bug where applying a color to text did not update the undo/redo history. - Fixed so shy entities gets displayed when using the visualchars plugin. - Fixed so removeformat removes ins/del by default since these might be used for strikethough. - Fixed so multiple language packs can be loaded and added to the global I18n data structure. - Fixed so transparent color selection gets treated as a normal color selection. Patch contributed by Alexander Hofbauer. - Fixed so it's possible to disable autoresize_overflow_padding, autoresize_bottom_margin options by setting them to false. - Fixed so the charmap plugin shows the description of the character in the dialog. Patch contributed by Jelle Hissink. - Removed address from the default list of block formats since it tends to be missused. - Fixed so the pre block format is called preformatted to make it more verbose. - Fixed so it's possible to context scope translation strings this isn't needed most of the time. - Fixed so the max length of the width/height input fields of the media dialog is 5 instead of 3. - Fixed so drag/dropped contents gets properly processed by paste plugin since it's basically a paste. Patch contributed by Greg Fairbanks. - Fixed so shortcut keys for headers is ctrl+alt+[1-9] instead of ctrl+[1-9] since these are for switching tabs in the browsers. - Fixed so "u" doesn't get converted into a span element by the legacy input filter. Since this is now a valid HTML5 element. - Fixed font families in order to provide appropriate web-safe fonts. -Version 4.1.7 (2014-11-27) - Added HTML5 schema support for srcset, source and picture. Patch contributed by mattheu. - Added new cache_suffix setting to enable cache busting by producing unique urls. - Added new paste_convert_word_fake_lists option to enable users to disable the fake lists convert logic. - Fixed so advlist style changes adds undo levels for each change. - Fixed bug where WebKit would sometimes produce an exception when the autolink plugin where looking for URLs. - Fixed bug where IE 7 wouldn't be rendered properly due to to aggressive css compression. - Fixed bug where DomQuery wouldn't accept window as constructor element. - Fixed bug where the color picker in 3.x dialogs wouldn't work properly. Patch contributed by Callidior. - Fixed bug where the image plugin wouldn't respect the document_base_url. - Fixed bug where the jQuery plugin would fail to append to elements named array prototype names. -Version 4.1.6 (2014-10-08) - Fixed bug with clicking on the scrollbar of the iframe would cause a JS error to be thrown. - Fixed bug where null would produce an exception if you passed it to selection.setRng. - Fixed bug where Ctrl/Cmd+Tab would indent the current list item if you switched tabs in the browser. - Fixed bug where pasting empty cells from Excel would result in a broken table. - Fixed bug where it wasn't possible to switch back to default list style type. - Fixed issue where the select all quirk fix would fire for other modifiers than Ctrl/Cmd combinations. - Replaced jake with grunt since it is more mainstream and has better plugin support. -Version 4.1.5 (2014-09-09) - Fixed bug where sometimes the resize rectangles wouldn't properly render on images on WebKit/Blink. - Fixed bug in list plugin where delete/backspace would merge empty LI elements in lists incorrectly. - Fixed bug where empty list elements would result in empty LI elements without it's parent container. - Fixed bug where backspace in empty caret formated element could produce an type error exception of Gecko. - Fixed bug where lists pasted from word with a custom start index above 9 wouldn't be properly handled. - Fixed bug where tabfocus plugin would tab out of the editor instance even if the default action was prevented. - Fixed bug where tabfocus wouldn't tab properly to other adjacent editor instances. - Fixed bug where the DOMUtils setStyles wouldn't properly removed or update the data-mce-style attribute. - Fixed bug where dialog select boxes would be placed incorrectly if document.body wasn't statically positioned. - Fixed bug where pasting would sometimes scroll to the top of page if the user was using the autoresize plugin. - Fixed bug where caret wouldn't be properly rendered by Chrome when clicking on the iframes documentElement. - Fixed so custom images for menubutton/splitbutton can be provided. Patch contributed by Naim Hammadi. - Fixed so the default action of windows closing can be prevented by blocking the default action of the close event. - Fixed so nodeChange and focus of the editor isn't automatically performed when opening sub dialogs. -Version 4.1.4 (2014-08-21) - Added new media_filter_html option to media plugin that blocks any conditional comments, scripts etc within a video element. - Added new content_security_policy option allows you to set custom policy for iframe contents. Patch contributed by Francois Chagnon. - Fixed bug where activate/deactivate events wasn't firing properly when switching between editors. - Fixed bug where placing the caret on iOS was difficult due to a WebKit bug with touch events. - Fixed bug where the resize helper wouldn't render properly on older IE versions. - Fixed bug where resizing images inside tables on older IE versions would sometimes fail depending mouse position. - Fixed bug where editor.insertContent would produce an exception when inserting select/option elements. - Fixed bug where extra empty paragraphs would be produced if block elements where inserted inside span elements. - Fixed bug where the spellchecker menu item wouldn't be properly checked if spell checking was started before it was rendered. - Fixed bug where the DomQuery filter function wouldn't remove non elements from collection. - Fixed bug where document with custom document.domain wouldn't properly render the editor. - Fixed bug where IE 8 would throw exception when trying to enter invalid color values into colorboxes. - Fixed bug where undo manager could incorrectly add an extra undo level when custom resize handles was removed. - Fixed bug where it wouldn't be possible to alter cell properties properly on table cells on IE 8. - Fixed so the color picker button in table dialog isn't shown unless you include the colorpicker plugin or add your own custom color picker. - Fixed so activate/deactivate events fire when windowManager opens a window since. - Fixed so the table advtab options isn't separated by an underscore to normalize naming with image_advtab option. - Fixed so the table cell dialog has proper padding when the advanced tab in disabled. -Version 4.1.3 (2014-07-29) - Added event binding logic to tinymce.util.XHR making it possible to override headers and settings before any request is made. - Fixed bug where drag events wasn't fireing properly on older IE versions since the event handlers where bound to document. - Fixed bug where drag/dropping contents within the editor on IE would force the contents into plain text mode even if it was internal content. - Fixed bug where IE 7 wouldn't open menus properly due to a resize bug in the browser auto closing them immediately. - Fixed bug where the DOMUtils getPos logic wouldn't produce a valid coordinate inside the body if the body was positioned non static. - Fixed bug where the element path and format state wasn't properly updated if you had the wordcount plugin enabled. - Fixed bug where a comment at the beginning of source would produce an exception in the formatter logic. - Fixed bug where setAttrib/getAttrib on null would throw exception together with any hooked attributes like style. - Fixed bug where table sizes wasn't properly retained when copy/pasting on WebKit/Blink. - Fixed bug where WebKit/Blink would produce colors in RGB format instead of the forced HEX format when deleting contents. - Fixed bug where the width attribute wasn't updated on tables if you changed the size inside the table dialog. - Fixed bug where control selection wasn't properly handled when the caret was placed directly after an image. - Fixed bug where selecting the contents of table cells using the selection.select method wouldn't place the caret properly. - Fixed bug where the selection state for images wasn't removed when placing the caret right after an image on WebKit/Blink. - Fixed bug where all events wasn't properly unbound when and editor instance was removed or destroyed by some external innerHTML call. - Fixed bug where it wasn't possible or very hard to select images on iOS when the onscreen keyboard was visible. - Fixed so auto_focus can take a boolean argument this will auto focus the last initialized editor might be useful for single inits. - Fixed so word auto detect lists logic works better for faked lists that doesn't have specific markup. - Fixed so nodeChange gets fired on mouseup as it used to before 4.1.1 we optimized that event to fire less often. - Removed the finish menu item from spellchecker menu since it's redundant you can stop spellchecking by toggling menu item or button. -Version 4.1.2 (2014-07-15) - Added offset/grep to DomQuery class works basically the same as it's jQuery equivalent. - Fixed bug where backspace/delete or setContent with an empty string would remove header data when using the fullpage plugin. - Fixed bug where tinymce.remove with a selector not matching any editors would remove all editors. - Fixed bug where resizing of the editor didn't work since the theme was calling setStyles instead of setStyle. - Fixed bug where IE 7 would fail to append html fragments to iframe document when using DomQuery. - Fixed bug where the getStyle DOMUtils method would produce an exception if it was called with null as it's element. - Fixed bug where the paste plugin would remove the element if the none of the paste_webkit_styles rules matched the current style. - Fixed bug where contextmenu table items wouldn't work properly on IE since it would some times fire an incorrect selection change. - Fixed bug where the padding/border values wasn't used in the size calculation for the body size when using autoresize. Patch contributed by Matt Whelan. - Fixed bug where conditional word comments wouldn't be properly removed when pasting plain text. - Fixed bug where resizing would sometime fail on IE 11 when the mouseup occurred inside the resizable element. - Fixed so the iframe gets initialized without any inline event handlers for better CSP support. Patch contributed by Matt Whelan. - Fixed so the tinymce.dom.Sizzle is the latest version of sizzle this resolves the document context bug. -Version 4.1.1 (2014-07-08) - Fixed bug where pasting plain text on some WebKit versions would result in an empty line. - Fixed bug where resizing images inside tables on IE 11 wouldn't work properly. - Fixed bug where IE 11 would sometimes throw "Invalid argument" exception when editor contents was set to an empty string. - Fixed bug where document.activeElement would throw exceptions on IE 9 when that element was hidden or removed from dom. - Fixed bug where WebKit/Blink sometimes produced br elements with the Apple-interchange-newline class. - Fixed bug where table cell selection wasn't properly removed when copy/pasting table cells. - Fixed bug where pasting nested list items from Word wouldn't produce proper semantic nested lists. - Fixed bug where right clicking using the contextmenu plugin on WebKit/Blink on Mac OS X would select the target current word or line. - Fixed bug where it wasn't possible to alter table cell properties on IE 8 using the context menu. - Fixed bug where the resize helper wouldn't be correctly positioned on older IE versions. - Fixed bug where fullpage plugin would produce an error if you didn't specify a doctype encoding. - Fixed bug where anchor plugin would get the name/id of the current element even if it wasn't anchor element. - Fixed bug where visual aids for tables wouldn't be properly disabled when changing the border size. - Fixed bug where some control selection events wasn't properly fired on older IE versions. - Fixed bug where table cell selection on older IE versions would prevent resizing of images. - Fixed bug with paste_data_images paste option not working properly on modern IE versions. - Fixed bug where custom elements with underscores in the name wasn't properly parsed/serialized. - Fixed bug where applying inline formats to nested list elements would produce an incorrect formatting result. - Fixed so it's possible to hide items from elements path by using preventDefault/stopPropagation. - Fixed so inline mode toolbar gets rendered right aligned if the editable element positioned to the documents right edge. - Fixed so empty inline elements inside empty block elements doesn't get removed if configured to be kept intact. - Fixed so DomQuery parentsUntil/prevUntil/nextUntil supports selectors/elements/filters etc. - Fixed so legacyoutput plugin overrides fontselect and fontsizeselect controls and handles font elements properly. -Version 4.1.0 (2014-06-18) - Added new file_picker_callback option to replace the old file_browser_callback the latter will still work though. - Added new custom colors to textcolor plugin will be displayed if a color picker is provided also shows the latest colors. - Added new color_picker_callback option to enable you to add custom color pickers to the editor. - Added new advanced tabs to table/cell/row dialogs to enable you to select colors for border/background. - Added new colorpicker plugin that lets you select colors from a hsv color picker. - Added new tinymce.util.Color class to handle color parsing and converting. - Added new colorpicker UI widget element lets you add a hsv color picker to any form/window. - Added new textpattern plugin that allows you to use markdown like text patterns to format contents. - Added new resize helper element that shows the current width & height while resizing. - Added new "once" method to Editor and EventDispatcher enables since callback execution events. - Added new jQuery like class under tinymce.dom.DomQuery it's exposed on editor instances (editor.$) and globally under (tinymce.$). - Fixed so the default resize method for images are proportional shift/ctrl can be used to make an unproportional size. - Fixed bug where the image_dimensions option of the image plugin would cause exceptions when it tried to update the size. - Fixed bug where table cell dialog class field wasn't properly updated when editing an a table cell with an existing class. - Fixed bug where Safari on Mac would produce webkit-fake-url for pasted images so these are now removed. - Fixed bug where the nodeChange event would get fired before the selection was changed when clicking inside the current selection range. - Fixed bug where valid_classes option would cause exception when it removed internal prefixed classes like mce-item-. - Fixed bug where backspace would cause navigation in IE 8 on an inline element and after a caret formatting was applied. - Fixed so placeholder images produced by the media plugin gets selected when inserted/edited. - Fixed so it's possible to drag in images when the paste_data_images option is enabled. Might be useful for mail clients. - Fixed so images doesn't get a width/height applied if the image_dimensions option is set to false useful for responsive contents. - Fixed so it's possible to pass in an optional arguments object for the nodeChanged function to be passed to all nodechange event listeners. - Fixed bug where media plugin embed code didn't update correctly. -Version 4.0.28 (2014-05-27) - Fixed critical issue with empty urls producing an exception when converted into absolute urls due to resent bug fix in tinymce.util.URI. -Version 4.0.27 (2014-05-27) - Added support for definition lists to lists plugin and enter key logic. This can now created by the format menu. - Added cmd option for the style_formats menu enables you to toggle commands on/off using the formats menu for example lists. - Added definition lists to visualblocks plugin so these are properly visualized like other list elements. - Added new paste_merge_formats option that reduces the number of nested text format elements produced on paste. Enabled by default. - Added better support for nested link_list/image_list menu items each item can now have a "menu" item with subitems. - Added "Add to Dictionary" support to spellchecker plugin when the backend tells that this feature is available. - Added new table_default_attributes/table_default_styles options patch contributed by Dan Villiom Podlaski Christiansen. - Added new table_class_list/table_cell_class_list/table_row_class_list options to table plugin. - Added new invalid_styles/valid_classes options to better control what gets returned for the style/class attribute. - Added new file_browser_callback_types option that allows you to specify where to display the picker based on dialog type. - Fixed so the selected state is properly handled on nested menu items in listboxes patch contributed by Jelle Kralt. - Fixed so the invisiblity css value for TinyMCE gets set to inherit instead of visible to better support dialog scripts like reveal. - Fixed bug where Gecko would remove anchors when pasting since the their default built in logic removes empty nodes. - Fixed bug where it wasn't possible to paste on Chrome Andoid since it doesn't properly support the Clipboard API yet. - Fixed bug where user defined type attribute value of text/javascript didn't get properly serialized. - Fixed bug where space in span elements would removed when the element was considered empty. - Fixed bug where the undo/redo button states didn't change if you removed all undo levels using undoManager.clear. - Fixed bug where unencoded links inside query strings or hash values would get processed by the relative urls logic. - Fixed bug where contextmenu would automatically close in inline editing mode on Firefox running on Mac. - Fixed bug where Gecko/IE would produce multiple BR elements when forced_root_block was set to false and a table was the last child of body. - Fixed bug where custom queryCommandState handlers didn't properly handle boolean states. - Fixed bug where auto closing float panels link menus wasn't automatically closed when the window was resized. - Fixed bug where the image plugin wouldn't update image dimensions when the current image was changed using the image_list select box. - Fixed bug with paste plugin not properly removing paste bin on Safari Mac when using the cmd+shift+v keyboard command. - Fixed bug where the paste plugin wouln't properly strip trailing br elements under very specific scenarios. - Fixed bug where enter key wouldn't properly place the caret on Gecko when pressing enter in a text block with a br ended line inside. - Fixed bug where Safari Mac shortcuts like Cmd+Opt+L didn't get passed through to the browser due to a Quirks fix. - Fixed so plain text mode works better when it converts rich text to plain text when pasting from for example Word. - Fixed so numeric keycodes can be used in the shortcut format enabling support for any key to be specified. - Fixed so table cells can be navigated with tab key and new rows gets automatically added when you are at the last cell. - Fixed bug where formatting before cursor gets removed when toggled off for continued content. -Version 4.0.26 (2014-05-06) - Fixed bug in media plugin where changing existing url did not use media regex patterns to create protocol neutral url. - Fixed bug where selection wasn't properly restored on IE 11 due to a browser bug with Element.contains. -Version 4.0.25 (2014-04-30) - Fixed bug where it wasn't possible to submit forms with editor instances on WebKit/Blink. -Version 4.0.24 (2014-04-30) - Added new event_root setting for inline editors. Lets you bind all editor events on a parent container. - Fixed bug where show/hide/isHidden didn't work properly for inline editor instances. - Fixed bug where preview plugin dialog didn't handle relative urls properly. - Fixed bug where the autolink plugin would remove the trailing space after an inserted link. - Fixed bug in paste plugin where pasting in a page with scrollbars would scroll to top of page in webkit browsers. - Fixed bug where the paste plugin on WebKit would remove styles from pasted source code with style attributes. - Fixed so image_list/link_list can be a function that allows custom async calls to populate these lists. -Version 4.0.23 (2014-04-24) - Added isSameOrigin method to tinymce.util.URI it handles default protocol port numbers better. Patch contributed by Matt Whelan. - Fixed bug where IE 11 would add br elements to the end of the editor body element each time it was shown/hidden. - Fixed bug where the autolink plugin would produce an index out of range exception for some very specific HTML. - Fixed bug where the charmap plugin wouldn't properly insert non breaking space characters when selected. - Fixed bug where pasting from Excel 2011 on Mac didn't produce a proper table when using the paste plugin. - Fixed bug where drag/dropping inside a table wouldn't properly end the table cell selection. - Fixed bug where drag/dropping images within tables on Safari on Mac wouldn't work properly. - Fixed bug where editors couldn't be re-initialized if they where externally destroyed. - Fixed bug where inline editors would produce a range index exception when clicking on buttons like bold. - Fixed bug where the preview plugin wouldn't properly handle non encoded upper UTF-8 characters. - Fixed so document.currentScript is used when detecting the current script location. Patch contributed by Mickael Desgranges. - Fixed issue with the paste_webkit_styles option so is disabled by default since it might produce a lot of extra styles. -Version 4.0.22 (2014-04-16) - Added lastLevel to BeforeAddUndo level event so it's easier to block undo level creation based. - Fixed so multiple list elements can be indented properly. Patch contributed by Dan Villiom Podlaski Christiansen. - Fixed bug where the selection would be at the wrong location sometimes for inline editor instances. - Fixed bug where drag/dropping content into an inline editor would fail on WebKit/Blink. - Fixed bug where table grid wouldn't work properly when the UI was rendered in for RTL mode. - Fixed bug where range normalization wouldn't handle mixed contentEditable nodes properly. - Fixed so the media plugin doesn't override the existing element rules you now need to manually whitelist non standard attributes. - Fixed so old language packs get properly loaded when the new longer language code format is used. - Fixed so all track changes junk such as comments, deletes etc gets removed when pasting from Word. - Fixed so non image data urls is blocked by default since they might contain scripts. - Fixed so it's possible to import styles from the current page stylesheets into an inline editor by using the importcss_file_filter. - Fixed bug where the spellchecker plugin wouldn't add undo levels for each suggestion replacement. - Reworked the default spellchecker RPC API to match the new PHP Spellchecker package. Fallback documented in the TinyMCE docs. -Version 4.0.21 (2014-04-01) - Added new getCssText method to formatter to get the preview css text value for a format to be used in UI. - Added new table_grid option that allows you to disable the table grid and use a dialog. - Added new image_description, image_dimensions options to image plugin. Patch contributed by Pat O'Neill. - Added new media_alt_source, media_poster, media_dimensions options to media plugin. Patch contributed by Pat O'Neill. - Added new ability to specify high/low dpi versions custom button images for retina displays. - Added new getWindows method to WindowManager makes it easier to control the currently opened windows. - Added new paste_webkit_styles option to paste plugin to control the styles that gets retained on WebKit. - Added preview of classes for the selectboxes used by the link_class_list/image_class_list options. - Added support for Sauce Labs browser testing using the new saucelabs-tests build target. - Added title input field to link dialog for a11y reasons can be disabled by using the link_title option. - Fixed so the toolbar option handles an array as input for multiple toolbar rows. - Fixed so the editor renders in XHTML mode apparently some people still use this rendering mode. - Fixed so icons gets rendered better on Firefox on Mac OS X by applying -moz-osx-font-smoothing. - Fixed so the auto detected external media sources produced protocol relative urls. Patch contributed by Pat O'Neill. - Fixed so it's possible to update the text of a button after it's been rendered to page DOM. - Fixed bug where iOS 7.1 Safari would open linked when images where inserted into links. - Fixed bug where IE 11 would scroll to the top of inline editable elements when applying formatting. - Fixed bug where tabindex on elements within the editor contents would cause issues on some browsers. - Fixed bug where link text wouldn't be properly updated in gecko if you changed an existing link. - Fixed bug where it wasn't possible to close dialogs with the escape key if the focus was inside a textbox. - Fixed bug where Gecko wouldn't paste rich text contents from Word or other similar word processors. - Fixed bug where binding events after the control had been rendered could fail to produce a valid delegate. - Fixed bug where IE 8 would throw and error when removing editors with a cross domain content_css setting. - Fixed bug where IE 9 wouldn't be able to select text after an editor instance with caret focus was removed. - Fixed bug where the autoresize plugin wouldn't resize the editor if you inserted huge images. - Fixed bug where multiple calls to the same init would produce extra editor instances. - Fixed bug where fullscreen toggle while having the autoresize plugin enabled wouldn't produce scrollbars. - Fixed so screen readers use a dialog instead of the grid for inserting tables. - Fixed so Office 365 Word contents gets filtered the same way as content from desktop Office. - Fixed so it's possible to override the root container for UI elements defaults to document.body. - Fixed bug where tabIndex is set to -1 on inline editable elements. It now keeps the existing tabIndex intact. - Fixed issue where the UndoManager transact method couldn't be nested since it only had one lock. - Fixed issue where headings/heading where labeled incorrectly as headers/header. -Version 4.0.20 (2014-03-18) - Fixed so all unit tests can be executed in a headless phantomjs instance for CI testing. - Fixed so directionality setting gets applied to the preview dialog as well as the editor body element. - Fixed a performance issue with the "is" method in DOMUtils. Patch contributed by Paul Bosselaar. - Fixed bug where paste plugin wouldn't paste plain text properly when pasting using browser menus. - Fixed bug where focusable SVG elements would throw an error since className isn't a proper string. - Fixed bug where the preview plugin didn't properly support the document_base_url setting. - Fixed bug where the focusedEditor wouldn't be set to null when that editor was removed. - Fixed bug where Gecko would throw an exception when editors where removed. - Fixed bug where the FocusManager wouldn't handle selection restoration properly on older IE versions. - Fixed bug where the searchreplace plugin would produce an exception on very specific multiple searches. - Fixed bug where some events wasn't properly unbound when all editors where removed from page. - Fixed bug where tapping links on iOS 7.1 would open the link instead of placing the caret inside. - Fixed bug where holding the finger down on iOS 7.1 would open the link/image callout menu. - Fixed so the jQuery plugin returns null when getting the the tinymce instance of an element before it's initialized. - Fixed so selection normalization gets executed more often to reduce incorrect UI states on Gecko. - Fixed so the default action of closing the window on a form submission can be prevented using "preventDefault". -Version 4.0.19 (2014-03-11) - Added support for CSS selector expressions in object_resizing option. Allows you to control what to resize. - Added addToTop compatibility to compat3x plugin enables more legacy 3.x plugins to work properly. - Fixed bug on IE where it wasn't possible to align images when they where floated left. - Fixed bug where the indent/outdent buttons was enabled though readonly mode was enabled. - Fixed bug where the nodeChanged event was fired when readonly mode was enabled. - Fixed bug where events like blur could be fired to editor instances that where manually removed on IE 11. - Fixed bug where IE 11 would move focus to menubar/toolbar when using the tab key in a form with an editor. - Fixed bug where drag/drop in Safari on Mac didn't work properly due to lack of support for modern dataTransfer object. - Fixed bug where the remove event wasn't properly executed when the editor instances where removed. - Fixed bug where the selection change handler on inline editors would fail if the editor instance was removed. -Version 4.0.18 (2014-02-27) - Fixed bug where images would get class false/undefined when initially created. -Version 4.0.17 (2014-02-26) - Added much better wai-aria accessibility support when it comes to keyboard navigation of complex UI controls. - Added dfn,code,samp,kbd,var,cite,mark,q elements to the default remove formats list. Patch contributed by Naim Hammadi. - Added var,cite,dfn,code,mark,q,sup,sub to the list of elements that gets cloned on enter. Patch contributed by Naim Hammadi. - Added new visual_anchor_class option to specify a custom class for inline anchors. Patch contributed by Naim Hammadi. - Added support for paste_data_images on WebKit/Blink when the user pastes image data. - Added support for highlighting the video icon when a video is added that produces an iframe. Patch contributed by monkeydiane. - Added image_class_list/link_class_list options to image/link dialogs to let the user select classes. - Fixed bug where the ObjectResizeStart event didn't get fired properly by the ControlSelection class. - Fixed bug where the autolink plugin would steal focus when loaded on IE 9+. - Fixed bug where the editor save method would remove the current selection when called on an inline editor. - Fixed bug where the formatter would merge span elements with parent bookmarks if an id format was used. - Fixed bug where WebKit/Blink browsers would scroll to the top of the editor when pasting into an empty element. - Fixed bug where removing the editor would cause an error about wrong document on IE 11 under specific circumstances. - Fixed bug where Gecko would place the caret at an incorrect location when using backspace. - Fixed bug where Gecko would throw "Wrong Document Error" for ranges that pointing to removed nodes. - Fixed bug where it wasn't possible to properly update the title and encoding properties in the fullpage plugin. - Fixed bug where paste plugin would produce an extra undo level on IE. - Fixed bug where the formatter would apply inline formatting outside the current word in if the selection was collapsed. - Fixed bug where it wasn't possible to delete tables on Chrome if you placed the selection within all the contents of the table. - Fixed bug where older IE versions wouldn't properly insert contents into table cells when editor focus was lost. - Fixed bug where older IE versions would fire focus/blur events even though the editor focus didn't change. - Fixed bug where IE 11 would add two trailing BR elements to the editor iframe body if the editor was hidden. - Fixed bug where the visualchars plugin wouldn't display non breaking spaces if they where inserted while the state was enabled. - Fixed bug where the wordcount plugin would be very slow some HTML where to much backtracking occurred. - Fixed so pagebreak elements in the editor breaks pages when printing. Patch contributed by penc. - Fixed so UndoManager events pass though the original event that created the undo level such as a keydown, blur etc. - Fixed so the inserttime button is callsed insertdatetime the same as the menu item and plugin name. - Fixed so the word count plugin handles counting properly on most languages on the planet. - Fixed bug where the auroreize plugin would throw an error if the editor was manually removed within a few seconds. - Fixed bug where the image dialog would get stuck if the src was removed. Patch contribued by monkeydiane. - Fixed bug where there is an extra br tag for IE 9/10 that isn't needed. Patch contributed by monkeydiane. - Fixed bug where drag/drop in a scrolled editor would fail since it didn't use clientX/clientY cordinates. Patch contributed by annettem. -Version 4.0.16 (2014-01-31) - Fixed bug where the editor wouldn't be properly rendered on IE 10 depending on the document.readyState. -Version 4.0.15 (2014-01-31) - Fixed bug where paste in inline mode would produce an exception if the contents was pasted inside non overflow element. -Version 4.0.14 (2014-01-30) - Fixed a bug in the image plugin where images couldn't be inserted if the image_advtab option wasn't set to true. -Version 4.0.13 (2014-01-30) - Added language selection menu to spellchecker button similar to the 3.x functionality. Patch contributed by threebytesfull. - Added new style_formats_merge option that enables you to append to the default formats instead of replaceing them. Patch contributed by PacificMorrowind. - Fixed bug where the DOMUtils getPos API function didn't properly handle the location of the root element. Patch contributed by Andrew Ozz. - Fixed bug where the spellchecker wouldn't properly place the spellchecker suggestions menu. Patch contributed by Andrew Ozz. - Fixed bug where the tabfocus plugin would prevent the user from suing Ctrl+Tab, Patch contributed by Andrew Ozz. - Fixed bug where table resize handles could sometimes be added to elements out side the editable inline element. - Fixed bug where the inline mode editor UI would render incorrectly when the stylesheets didn't finish loading on Chrome. - Fixed bug where IE 8 would insert the image outside the editor unless it was focused first. - Fixed bug where older IE versions would throw an exception on drag/drop since they don't support modern dataTransfer API. - Fixed bug where the blockquote button text wasn't properly translated since it had the wrong English key. - Fixed bug where the importcss plugin didn't import a.class rules properly as selector formats. - Fixed bug where the combobox control couldn't be disabled or set to a specific character size initially. - Fixed bug where the FormItem didn't inherit the disabled state from the control to be wrapped. - Fixed bug where adding a TinyMCE instance within a TinyMCE dialog wouldn't properly delegate the events. - Fixed bug where any overflow parent containers would automatically scroll to the left when pasting in Chrome. - Fixed bug where IE could throw an error when search/replacing contents due to an invalid selection being returned. - Fixed bug where WebKit would fire focus/blur events incorrectly if the editor was empty due to a WebKit focus bug. - Fixed bug where WebKit/Blink would scroll to the top of editor if the height was more than the viewport height. - Fixed bug where blurring and removing the editor could cause an exteption to be thrown by the FocusManager. - Fixed bug where the media plugin would override specified dimensions for url pattern matches. Patch contributed by penc. - Fixed bug where the autoresize plugin wouldn't take margins into account when calculating the body size. Patch contributed by lepoltj. - Fixed bug where the image plugin would throw errors some times on IE 8 when it preloaded the image to get it's dimensions. - Fixed bug where the image plugin wouldn't update the style if the user closed the dialog before focusing out. Patch contributed by jonparrott. - Fixed bug where bindOnReady in EventUtils wouldn't work properly for some edge cases on older IE versions. Patch contributed by Godefroy. - Fixed bug where image selector formats wasn't properly handled by the importcss plugin. - Fixed bug where the dirty state of the editor wasn't set when editing an existing link URL. - Fixed bug where it wasn't possible to prevent paste from happening by blocking the default behavior when the paste plugin was enabled. - Fixed bug where text to display in the insert/edit link dialog wouldn't be properly entity encoded. - Fixed bug where Safari 7 on Mac OS X would delete contents if you pressed Cmd+C since it passes out a charCode for the event. - Fixed bug where bound drop events inside inline editors would get fired on all editor instances instead of the specific instance. - Fixed bug where images outlined selection border would be clipped when the autoresize plugin was enabled. - Fixed bug where image dimension constrains proportions wouldn't work properly if you altered a value and immediately clicked the submit button. - Fixed so you don't need to set language option to false when specifying a custom language_url. - Fixed so the link dialog "text to display" field gets automatically hidden if the selection isn't text contents. Patch contributed by Godefroy. - Fixed so the none option for the target field in the link dialog gets excluded when specifiying the target_list config option. - Fixed so outline styles are displayed by default in the formats preview. Patch contributed by nhammadi. - Fixed so the max characters for width/height is more than 3 in the media and image dialogs. - Fixed so the old mceSpellCheck command toggles the spellchecker on/off. - Fixed so the setupeditor event is fired before the setup callback setting to ease up compatibility with 3.x. - Fixed so auto url link creation in IE 9+ is disabled by default and re-enabled by the autolink plugin. - Removed the custom scrollbars for WebKit since the default browser scrollbars looks a lot better now days. -Version 4.0.12 (2013-12-18) - Added new media_scripts option to the media plugin. This makes it possible to embed videos using script elements. - Fixed bug where WebKit/Blink would produce random span elements and styles when deleting contents inside the editor. - Fixed bug where WebKit/Blink would produce span elements out of link elements when they where removed by the unlink command. - Fixed bug where div block formats in inline mode where applied to all paragraphs within the editor. - Fixed bug where div blocks where marked as an active format in inline mode when doing non collapsed selections. - Fixed bug where the importcss plugin wouldn't append styles if the style_formats option was configured. - Fixed bug where the importcss plugin would import styles into groups multiple times for different format menus. - Fixed bug where the paste plugin wouldn't properly remove the paste bin element on IE if a tried to paste a file. - Fixed bug where selection normalization wouldn't properly handle cases where a range point was after a element node. - Fixed bug where the default time format for the inserttime split button wasn't the first item in the list. - Fixed bug where the default text for the formatselect control wasn't properly translated by the language pack. - Fixed bug where links would be inserted incorrectly when auto detecting absolute urls/emails links in inline mode. - Fixed bug where IE 11 would insert contents in the wrong order due to focus/blur async problems. - Fixed bug where pasting contents on IE sometimes would place the contents at the end of the editor. - Fixed so drag/drop on non IE browsers gets filtered by the paste plugin. IE doesn't have the necessary APIs. - Fixed so the paste plugin better detects Word 2007 contents not marked with -mso junk. - Fixed so image button isn't set to an active state when selecting control/media placeholder items. -Version 4.0.11 (2013-11-20) - Added the possibility to update button icon after it's been rendered. - Added new autosave_prefix option allows you to set the prefix for the local storage keys. - Added new pagebreak_split_block option to make it easier to split block elements with a page break. - Fixed bug where IE would some times produce font elements when typing out side the body root blocks. - Fixed bug where IE wouldn't properly use the configured root block element but instead use the a paragraph. - Fixed bug where IE would throw a stack overflow if control selections non images was made in inline mode. - Fixed bug where IE 8 would render an extra enter element if the contents of the editor was empty. - Fixed bug where the caret wasn't moved to the first suitable element when updating the source. - Fixed bug where protocol relative urls would be forced into http protocol. - Fixed bug where internal images with data urls such as video elements would be removed by the paste_data_images option. - Fixed bug where the autoresize plugin wouldn't properly resize the editor to initial contents some times. - Fixed bug where the templates dialog wouldn't be properly rendered on IE 7. - Fixed bug where updating styles in the advanced tab under the image dialog would remove the style attribute on cancel. - Fixed bug where tinymce.full.min.js bundle script wasn't detected when looking for the tinymce root path. - Fixed bug where the SaxParser would throw a malformed URI sequence for inproperly encoded uris. - Fixed bug where enabling table caption wouldn't properly render the caption element on IE 10 and below. - Fixed bug where the scrollbar would be placed to the left and on top of the text of menu items in RTL mode. - Fixed bug where Firefox on Mac OS X would navigate forward/backward on CMD+Arrow keys. - Fixed bug where fullscreen toggle on fixed sized editors wouldn't be properly full screened. - Fixed bug where the unlink button would remove all links from the body element in inline mode under running in IE. - Fixed bug where iOS wasn't able to place the caret inside an empty editor when clicking below the first line. - Fixed so internal document anchors in Word documents are retained when pasting using the paste from word feature. - Fixed so menu shortcuts gets rendered with the Apple command icon patch contributed by Andy Keller. - Fixed so the CSS compression of styles like "border" is a bit better for mixed values. - Fixed so the template_popup_width/template_popup_height option works properly in the template plugin. - Fixed so the languages parameter for AddOnManager.requireLangPack works the same way as for 3.x. - Fixed so the autosave plugin uses the current page path, query string and editor id as it's default prefix. - Fixed so the fullpage plugin adds/removes any link style sheets to the current iframe document. -Version 4.0.10 (2013-10-28) - Added new forced_root_block_attrs option that allows you to specify attributes for the root block. - Fixed bug where the custom resize handles didn't work properly on IE 11. - Fixed bug where the code plugin would select all contents in IE when content was updated. - Fixed bug where the scroll position wouldn't get applied to floating toolbars. - Fixed bug where focusing in/out of the editor would move the caret to the top of the editor on IE 11. - Fixed bug where the listboxes for link and image lists wasn't updated when the url/src was changed. - Fixed bug where selection bookmark elements would be visible in the elements path list. -Version 4.0.9 (2013-10-24) - Added support for external template files to template plugin just set the templates option to a URL with JSON data. - Added new allow_script_urls option. Enabled by default, trims all script urls from attributes. - Fixed bug where IE would sometimes throw a "Permission denied" error unless the Sizzle doc was properly removed. - Fixed bug where lists plugin would remove outer list items if inline editable element was within a LI parent. - Fixed bug where insert table grid widget would insert a table on item to large when using a RTL language pack. - Fixed bug where fullscreen mode wasn't rendering properly on IE 7. - Fixed bug where resize handlers wasn't moved correctly when scrolling inline editable elements. - Fixed bug where it wasn't possible to paste from Excel and possible other applications due to Clipboard API bugs in browsers. - Fixed bug where Shift+Ctrl+V didn't produce a plain text paste on IE. - Fixed bug where IE would sometimes move the selection to the a previous location. - Fixed bug where the editor wasn't properly scrolled to the content insert location in inline mode. - Fixed bug where some comments would be parsed as HTML by the SaxParser. - Fixed bug where WebKit/Blink would render tables incorrectly if unapplying formats when having multiple table cells selected. - Fixed bug where the paste_data_images option wouldn't strip all kinds of data images. - Fixed bug where the GridLayout didn't render items correctly if the contents overflowed the layout container. - Fixed bug where the Window wasn't properly positioned if the size of the button bar or title bar was wider than the contents. - Fixed bug where psuedo selectors for finding UI controls didn't work properly. - Fixed bug where resized splitbuttons would throw an exception if it didn't contain an icon. - Fixed bug where setContent would move focus into the editor even though it wasn't active. - Fixed bug where IE 11 would sometimes throw an "Invalid function" error when calling setActive on the body element. - Fixed bug where the importcss plugin would import styles from CSS files not present in the content_css array. - Fixed bug where the jQuery plugin will initialize the editors twice if the core was loaded using the script_url option. - Fixed various bugs and issues related to indentation of OL/UL list elements. - Fixed so IE 7 renders the classic mode buttons the same size as other browsers. - Fixed so document.readyState is checked when loading and initializing TinyMCE manually after page load. -Version 4.0.8 (2013-10-10) - Added RTL support so all of the UI is rendered right to left if a language pack has a _dir property set to rtl. - Fixed bug where layout managers wouldn't handle subpixel values properly. When for example the browser was zoomed in. - Fixed bug where the importcss plugin wouldn't import classes from local stylesheets with remote @import rules on Gecko. - Fixed bug where Arabic characters wouldn't be properly counted in wordcount plugin. - Fixed bug where submit event would still fire even if it was unbound on IE 10. Now the event is simply ignored. - Fixed bug where IE 11 would return border-image: none when getting style attributes with borders in them. - Fixed various UI rendering issues on older IE versions. - Fixed so readonly option renderes the editor in inline mode with all UI elements disabled and all events blocked. -Version 4.0.7 (2013-10-02) - Added new importcss_selector_filter option to importcss plugin. Makes it easier to select specific classes to import. - Added new importcss_groups option to importcss plugin. Enables you separate classes into menu groups based on filters. - Added new PastePreProcess/PastePostProcess events and reintroduced paste_preprocess/paste_postprocess paste options. - Added new paste_word_valid_elements option lets you control what elements gets pasted when pasting from Word. - Fixed so panelbutton is easier to use. It's now possible to set the panel contents to any container type. - Fixed so editor.destroy calls editor.remove so that both destroy and remove can be used to remove an editor instance. - Fixed so the searchreplace plugin doesn't move focus into the editor until you close the dialog. - Fixed so the searchreplace plugin search for next item if you hit enter inside the dialog. - Fixed so importcss_selector_converter callback is executed with the scope set to importcss plugin instance. - Fixed so the default selector converter function is exposed in importcss plugin. - Fixed issue with the tabpanel not expanding properly when the tabs where wider than the body of the panel. - Fixed issue with the menubar option producing a JS exception if set to true. - Fixed bug where closing a dialog with an opened listbox would cause errors if new dialogs where opened. - Fixed bug where hidden input elements wasn't removed when inline editor instances where removed. - Fixed bug where editors wouldn't initialize some times due to event logic not working correctly. - Fixed bug where pre elements woudl cause searchreplace and spellchecker plugins to mark incorrect locations. - Fixed bug where embed elements wouldn't be properly resized if they where configured in using the video_template_callback. - Fixed bug where paste from word would remove all BR elements since it was missing in the default paste_word_valid_elements. - Fixed bug where paste filtering wouldn't work properly on old WebKit installations pre Clipboard API. - Fixed bug where linebreaks would be removed by paste plugin on IE since it didn't properly detect Word contents. - Fixed bug where paste plugin would convert some Word paragraphs that looked like lists into lists. - Fixed bug where editors wasn't properly initialized if the document.domain is set to the same as the current domain on IE. - Fixed bug where an exception was thrown when removing an editor after opening the context menu multiple times. - Fixed bug where paste as plain text on Gecko would add extra BR elements when pasting paragraphs. -Version 4.0.6 (2013-09-12) - Added new compat3x plugin that makes it possible to load most 3.x plugins. Only available in the development package. - Added new skin_url option enables you to load local skins when using the CDN version. - Added new theme_url option enables you to load local themes when using the CDN version. - Added new importcss_file_filter option to importcss to enable users to specify what files to import from. - Added new template_preview_replace_values option to template plugin to add example data for variables. - Added image option support for addMenuItem calls. Enables you to provide a custom image for menu items. - Fixed bug where editor.insertContent wouldn't set format and selection type on events. - Fixed bug where inserting BR elements on IE 8 would thrown an exception when the range is at a empty text node. - Fixed bug where outdent of single LI element within another LI would produce an empty list element OL/UL. - Fixed bug where the bullist/numlist buttons wouldn't be deselected when deleting all contents. - Fixed bug where toggling an empty list item off wouldn't produce a new empty block element. - Fixed bug where it wasn't possible to apply lists to mixed text blocks and br lines. - Fixed bug where it wasn't possible to paste contents on iOS when the paste plugin was enabled. - Fixed bug where it wasn't possible to delete HR elements on Gecko. - Fixed bug where scrolling and refocusing using the mouse would place the caret incorrectly on IE. - Fixed bug where you needed to hit the empty paragraph to get editor focus in IE 11. - Fixed bug where activeEditor wasn't set to the correct editor when opening windows. - Fixed bug where dirty state wasn't set to false when undoing to the first undo level. - Fixed bug where pasting in inline mode on Safari on Mac wouldn't work properly. - Fixed bug where content_css wasn't loaded into the insert template dialog. - Fixed bug where setting the contents of the editor to non text contents would produce an incorrect selection range. - Fixed so code dialog height gets smaller that the viewport height if it doesn't fit. - Fixed so inline editable regions scroll when pressing enter/return. - Fixed so inline toolbar gets positioned correctly when inline element is within a scrollable container. - Fixed various memory leaks when removing editor instances dynamically. - Removed CSS for BR elements in visualblocks due to problems with Chrome and IE. -Version 4.0.5 (2013-08-27) - Added visuals for UL, LI and BR to visualblocks plugin. Patch contributed by Dan Ransom. - Added new autosave_restore_when_empty option to autosave plugin. Enabled by default. - Fixed bug where an exception was thrown when inserting images if valid_elements didn't include an ID for the image. - Fixed bug where the advlist plugin wouldn't properly render the splitbutton controls. - Fixed bug where visual blocks menu item wouldn't be marked checked when using the visualblocks_default_state option. - Fixed bug where save button in save plugin wouldn't get properly enabled when contents was changed. - Fixed bug where it was possible to insert images without any value for it's source attribute. - Fixed bug where altering image attributes wouldn't add a new undo level. - Fixed bug where import rules in CSS files wouldn't be properly imported by the importcss plugin. - Fixed bug where selectors could be imported multiple times. Producing duplicate formats. - Fixed bug where IE would throw exception if selection was changed while the editor was hidden. - Fixed so complex rules like .class:before doesn't get imported by default in the importcss plugin. - Fixed so it's possible to remove images by setting the src attribute to a blank value. - Fixed so the save_enablewhendirty setting in the save plugin is enabled by default. - Fixed so block formats drop down for classic mode can be translated properly using language packs. - Fixed so hr menu item and toolbar button gets the same translation string. - Fixed so bullet list toolbar button gets the correct translation from language packs. - Fixed issue with Chrome logging CSS warning about border styling for combo boxes. - Fixed issue with Chrome logging warnings about deprecated keyLocation property. - Fixed issue where custom_elements would not remove the some of the default rules when cloning rules from div and span. -Version 4.0.4 (2013-08-21) - Added new importcss plugin. Lets you auto import classes from CSS files similar to the 3.x behavior. - Fixed bug where resize handles would be positioned incorrectly when inline element parent was using position: relative. - Fixed bug where IE 8 would throw Unknown runtime error if the editor was placed within a P tag. - Fixed bug where removing empty lists wouldn't produce blocks or brs where the old list was in the DOM. - Fixed bug where IE 10 wouldn't properly initialize template dialog due to async loading issues. - Fixed bug where autosave wouldn't properly display the warning about content not being saved due to isDirty changes. - Fixed bug where it wouldn't be possible to type if a touchstart event was bound to the parent document. - Fixed bug where code dialog in code plugin wouldn't wouldn't add a proper undo level. - Fixed issue where resizing the editor in vertical mode would set the iframe width to a pixel value. - Fixed issue with naming of insertdatetime settings. All are now prefixed with the plugin name. - Fixed so an initial change event is fired when the user types the first character into the editor. - Fixed so swf gets mapped to object element in media plugin. Enables embedding of flash with alternative poster. -Version 4.0.3 (2013-08-08) - Added new code_dialog_width/code_dialog_height options to control code dialog size. - Added missing pastetext button that works the same way as the pastetext menu item. - Added missing smaller browse button for the classical smaller toolbars. - Fixed bug where input method would produce new lines when inserting contents to an empty editor. - Fixed bug where pasting single indented list items from Word would cause a JS exception. - Fixed bug where applying block formats inside list elements in inline mode would apply them to whole document. - Fixed bug where link editing in inline mode would cause exception on IE/WebKit. - Fixed bug where IE 10 wouldn't render the last button group properly in inline mode due to wrapping. - Fixed bug where localStorage initialization would fail on Firefox/Chrome with disabled support. - Fixed bug where image elements would get an __mce id when undo/redo:ing to a level with image changes. - Fixed bug where too long template names wouldn't fit the listbox in template plugin. - Fixed bug where alignment format options would be marked disabled when forced_root_block was set to false. - Fixed bug where UI listboxes such as fontsize, fontfamily wouldn't update properly when switching editors in inline mode. - Fixed bug where the formats select box would mark the editable container DIV as a applied format in inline mode. - Fixed bug where IE 7/8 would scroll to empty editors when initialized. - Fixed bug where IE 7/8 wouldn't display previews of format options. - Fixed bug where UI states wasn't properly updated after code was changed in the code dialog. - Fixed bug with setting contents in IE would select all contents within the editor. - Fixed so the undoManages transact function disables any other undo levels from being added while within the transaction. - Fixed so sub/sup elements gets removed when the Clear formatting action is executed. - Fixed so text/javascript type value get removed by default from script elements to match the HTML5 spec. -Version 4.0.2 (2013-07-18) - Fixed bug where formatting using menus or toolbars wasn't possible on Opera 12.15. - Fixed bug where IE 8 keyboard input would break after paste using the paste plugin. - Fixed bug where IE 8 would throw an error when populating image size in image dialog. - Fixed bug where image resizing wouldn't work properly on latest IE 10.0.9 version. - Fixed bug where focus wasn't moved to the hovered menu button in a menubar container. - Fixed bug where paste would produce an extra uneeded undo level on IE and Gecko. - Fixed so anchors gets listed in the link dialog as they where in TinyMCE 3.x. - Fixed so sub, sup and strike though gets passed through when pasting from Word. - Fixed so Ctrl+P can be used to print the current document. Patch contributed by jashua212. -Version 4.0.1 (2013-06-26) - Added new paste_as_text config option to force paste as plaintext mode. - Added new pastetext menu item that lets you toggle paste as plain text mode on/off. - Added new insertdatetime_element option to insertdatetime plugin. Enables HTML5 time element support. - Added new spellchecker_wordchar_pattern option to allow configuration of language specific characters. - Added new marker to formats menu displaying the formats used at the current selection/caret location. - Fixed bug where the position of the text color picker would be wrong if you switched to fullscreen. - Fixed bug where the link plugin would ask to add the mailto: prefix multiple times. - Fixed bug where list outdent operation could produce empty list elements on specific selections. - Fixed bug where element path wouldn't properly select parent elements on IE. - Fixed bug where IE would sometimes throw an exception when extrancting the current selection range. - Fixed bug where line feeds wasn't properly rendered in source view on IE. - Fixed bug where word count wouldn't be properly rendered on IE 7. - Fixed bug where menubuttons/listboxes would have an incorrect height on IE 7. - Fixed bug where browser spellchecking was enabled while editing inline on IE 10. - Fixed bug where spellchecker wouldn't properly find non English words. - Fixed bug where deactivating inline editor instances would force padding-top: 0 on page body. - Fixed bug where jQuery would initialize editors multiple times since it didn't check if the editor already existed. - Fixed bug where it wasn't possible to paste contents on IE 10 in modern UI mode when paste filtering was enabled. - Fixed bug where tabfocus plugin wouldn't work properly on inline editor instances. - Fixed bug where fullpage plugin would clear the existing HTML head if contents where inserted into the editor. - Fixed bug where deleting all table rows/columns in a table would cause an exception to be thrown on IE. - Fixed so color button panels gets toggled on/off when activated/deactivated. - Fixed so format menu items that can't be applied to the current selection gets disabled. - Fixed so the icon parameter for addButton isn't automatically filled if a button text is provided. - Fixed so image size fields gets updated when selecting a new image in the image dialog. - Fixed so it doesn't load any language pack if the language option is set to "en". - Fixed so ctrl+shift+z works as an alternative redo shortcut to match a common Mac OS X shortcut. - Fixed so it's not possible to drag/drop in images in Gecko by default when paste plugin is enabled. - Fixed so format menu item texts gets translated using the specified language pack. - Fixed so the image dialog title is the same as the insert/edit image button text. - Fixed so paste as plain text produces BR:s in PRE block and when forced_root_block is disabled. -Version 4.0 (2013-06-13) - Added new insertdate_dateformat, insertdate_timeformat and insertdate_formats options to insertdatetime. - Added new font_formats, fontsize_formats and block_formats options to configure fontselect, fontsizeselect and formatselect. - Added new table_clone_elements option to table plugin. Enables you to specify what elements to clone when adding columns/rows. - Added new auto detect logic for site and email urls in link plugin to match the logic found in 3.x. - Added new getParams/setParams to WindowManager to make it easier to handle params to iframe based dialogs. Contributed by Ryan Demmer. - Added new textcolor options that enables you to specify the colors you want to display. Contributed by Jennifer Arsenault. - Added new external file support for link_list and image_list options. The file format is a simple JSON file. - Added new "both" mode for the resize option. Enables resizing in both width and height. - Added new paste_data_images option that allows you to enable/disable paste of data images. - Added new fixed_toolbar_container option that allows you to add a fixed container for the inline toolbar. - Fixed so font name, font size and block format select boxes gets updated with the current format. - Fixed so the resizeTo/resizeBy methods for the theme are exposed as it as in 3.x. - Fixed so the textcolor controls are splitbuttons as in 3.x. Patch contributed by toxalot/jashua212. - Fixed bug where the theme content css wasn't loaded into the preview dialog. - Fixed bug where the template description in template dialog wouldn't display the text correctly. - Fixed bug where various UI elements wasn't properly removed when an editor instance was removed. - Fixed bug where editing links in inline mode would fail on WebKit. - Fixed bug where the pagebreak_separator option in the pagebreak plugin wasn't working properly. - Fixed bug where the child panels of the float panel in inline mode wasn't properly placed. - Fixed bug where the float panel children of windows wasn't position fixed. - Fixed bug where the size of the ok button was hardcoded, caused issues with i18n. - Fixed bug where single comment in editor would cause exceptions due to resolve path logic not detecting elements only. - Fixed bug where switching alignment of tables in dialogs wouldn't properly remove existing alignments. - Fixed bug where the table properties dialog would show columns/rows textboxes. - Fixed bug where jQuery wasn't used instead of Sizzle in the jQuery version of TinyMCE. - Fixed bug where setting resize option to false whouldn't properly render the word count. - Fixed bug where table row type change would produce multiple table section elements. - Fixed bug where table row type change on multiple rows would add them in incorrect order. - Fixed bug where fullscreen plugin would maximize the editor on resize after toggling it off. - Fixed bug where context menu would be position at an incorrect coordinate in inline mode. - Fixed bug where inserting lists in inline mode on IE would produce errors since the body would be converted. - Fixed bug where the body couldn't be styled properly in custom content_css files. - Fixed bug where template plugins menu item would override the image menu item. - Fixed bug where IE 7-8 would render the text inside inputs at the wrong vertical location. - Fixed bug where IE configured to IE 7 compatibility mode wouldn't render the icons properly. - Fixed bug where editor.focus wouldn't properly fire the focusin event on WebKit. - Fixed bug where some keyboard shortcuts wouldn't work on IE 8. - Fixed bug where the undo state wasn't updated until the end of a typing level. - Fixed bug where keyboard shortcuts on Mac OS wasn't working correctly. - Fixed bug where empty inline elements would be created when toggling formatting of in empty block. - Fixed bug where applying styles on WebKit would fail in inline mode if the user released the mouse button outside the body. - Fixed bug where the visual aids menu item wasn't selected if the editor was empty. - Fixed so the isDirty/isNotDirty states gets updated to true/false on save() and change events. - Fixed so skins have separate CSS files for inline and iframe mode. - Fixed so menus and tool tips gets constrained to the current viewport. - Fixed so an error is thrown if users load jQuery after the jQuery version of TinyMCE. - Fixed so the filetype for media dialog passes out media instead of image as file type. - Fixed so it's possible to disable the toolbar by setting it to false. - Fixed so autoresize plugin isn't initialized when the editor is in inline mode. - Fixed so the inline editing toolbar will be rendered below elements if it doesn't fit above it. -Version 4.0b3 (2013-05-15) - Added new optional advanced tab for image dialog with hspace, vspace, border and style. - Added new change event that gets fired when undo levels are added to editor instances. - Added new removed_menuitems option enables you to list menu items to remove from menus. - Added new external_plugins option enables you to specify external locations for plugins. - Added new language_url option enables you to specify an external location for the language pack. - Added new table toolbar control that displays a menu for inserting/editing menus. - Fixed bug where IE 10 wouldn't load files properly from cache. - Fixed bug where image dialog wouldn't properly remove width/height if blanked. - Fixed bug where all events wasn't properly unbound when editor instances where removed. - Fixed bug where data- attributes wasn't working properly in the SaxParser. - Fixed bug where Gecko wouldn't properly render broken images. - Fixed bug where Gecko wouldn't produce the same error dialog on paste as other browsers. - Fixed bug where is wasn't possible to prevent execCommands in beforeExecCommand event. - Fixed bug where the fullpage_hide_in_source_view option wasn't working in the fullpage plugin. - Fixed bug where the WindowManager close method wouldn't properly close the top most window. - Fixed bug where it wasn't possible to paste in IE 10 due to JS exception. - Fixed bug where tab key didn't move to the right child control in tabpanels. - Fixed bug where enter inside a form would focus the first button like control in TinyMCE. - Fixed bug where it would match scripts that looked like the tinymce base directory incorrectly. - Fixed bug where the spellchecker wouldn't properly toggle off the spellcheck mode if no errors where found. - Fixed bug in searchreplace plugin where it would remove all spans instead of the marker spans. - Fixed issue where selector wouldn't disable existing mode setting. - Fixed so it's easier to configure the menu and menubar. - Fixed so bodyId/bodyClass is applied to preview as it's done to the editor iframe. -Version 4.0b2 (2013-04-24) - Added new rel_list option to link plugin. Enables you to specify values for a rel drop down. - Added new target_list option to link plugin. Enables you to add to or disable the link targets. - Added new link_list option to link plugin. Enables you to specify a list of links to pick from. - Added new image_list option to image pluigin. Enables you to specify a list of images to pick from. - Added new textcolor plugin. This plugin holds the text color and text background color buttons. - Fixed bug where alignment of images wasn't working properly on Firefox. - Fixed bug where IE 8 would throw error when inserting a table. - Fixed bug where IE 8 wouldn't render the element path properly. - Fixed bug where old IE versions would render a red focus border. - Fixed bug where old IE versions would render a frameborder for iframes. - Fixed bug where WebKit wouldn't properly open the cell properties dialog on edge case selection. - Fixed bug where charmap wouldn't correctly render all characters in grid. - Fixed bug where link dialog wouldn't update the link text properly. - Fixed bug where the focus/blur states on inline editors wasn't handled correctly on IE. - Fixed bug where IE would throw "unknown error" exception sometimes in ForceBlocks logic. - Fixed bug where IE would't properly render disabled buttons in button groups. - Fixed bug where tab key wouldn't properly move to next input field in dialogs. - Fixed bug where resize handles for tables and images would appear at wrong positions on IE 8. - Fixed bug where dialogs would produce stack overflow if title was wider than content. - Fixed bug with table cell/row menu items being enabled even if no cell was selected. - Fixed so the text to display is after the URL field in the link dialog. - Fixed so the width setting applies to the editor panel in modern theme. - Fixed so it's easier to make custom icons for buttons using plain old images. -Version 4.0b1 (2013-04-11) - Added new node.js based build process used uglify, amdlc, jake etc. - Added new package.json to enable easy installation of dependent npm packages used for building. - Added new link, image, charmap, anchor, code, hr plugins since these are now moved out of the theme. - Rewrote all plugins and themes from scratch so they match the new UI framework. - Replaced all events to use the more common .on/off() methods instead of ..add/remove. - Rewrote the TinyMCE core to use AMD style modules. Gets compiled to an inline library using amdlc. - Rewrote all core logic to pass jshint rules. Each file has specific jshint rules. - Removed all IE6 specific logic since 4.x will no longer support such an old browser. - Reworked the file names and directory structure of the whole project to be more similar to other JS projects. - Replaced tinymce.util.Cookie with tinymce.util.LocalStorage. Fallback to userData for IE 7 native localStorage for the rest. - Replaced the old 3.x UI with a new modern UI framework. - Removed "simple" theme and added new "modern" theme. - Removed advhr, advimage, advlink, iespell, inlinepopups, xhtmlxtras and style plugins. - Updated Sizzle to the latest version. diff --git a/tinymce-4.2.8/js/tinymce/langs/readme.md b/tinymce-4.2.8/js/tinymce/langs/readme.md deleted file mode 100644 index a52bf03..0000000 --- a/tinymce-4.2.8/js/tinymce/langs/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -This is where language files should be placed. - -Please DO NOT translate these directly use this service: https://www.transifex.com/projects/p/tinymce/ diff --git a/tinymce-4.2.8/js/tinymce/license.txt b/tinymce-4.2.8/js/tinymce/license.txt deleted file mode 100644 index 1837b0a..0000000 --- a/tinymce-4.2.8/js/tinymce/license.txt +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/tinymce-4.2.8/js/tinymce/plugins/advlist/plugin.min.js b/tinymce-4.2.8/js/tinymce/plugins/advlist/plugin.min.js deleted file mode 100644 index 1e1c668..0000000 --- a/tinymce-4.2.8/js/tinymce/plugins/advlist/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -tinymce.PluginManager.add("advlist",function(a){function b(a,b){var c=[];return tinymce.each(b.split(/[ ,]/),function(a){c.push({text:a.replace(/\-/g," ").replace(/\b\w/g,function(a){return a.toUpperCase()}),data:"default"==a?"":a})}),c}function c(b,c){a.undoManager.transact(function(){var d,e=a.dom,f=a.selection;d=e.getParent(f.getNode(),"ol,ul"),d&&d.nodeName==b&&c!==!1||a.execCommand("UL"==b?"InsertUnorderedList":"InsertOrderedList"),c=c===!1?g[b]:c,g[b]=c,d=e.getParent(f.getNode(),"ol,ul"),d&&(e.setStyle(d,"listStyleType",c?c:null),d.removeAttribute("data-mce-style")),a.focus()})}function d(b){var c=a.dom.getStyle(a.dom.getParent(a.selection.getNode(),"ol,ul"),"listStyleType")||"";b.control.items().each(function(a){a.active(a.settings.data===c)})}var e,f,g={};e=b("OL",a.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman")),f=b("UL",a.getParam("advlist_bullet_styles","default,circle,disc,square")),a.addButton("numlist",{type:"splitbutton",tooltip:"Numbered list",menu:e,onshow:d,onselect:function(a){c("OL",a.control.settings.data)},onclick:function(){c("OL",!1)}}),a.addButton("bullist",{type:"splitbutton",tooltip:"Bullet list",menu:f,onshow:d,onselect:function(a){c("UL",a.control.settings.data)},onclick:function(){c("UL",!1)}})}); \ No newline at end of file diff --git a/tinymce-4.2.8/js/tinymce/plugins/anchor/plugin.min.js b/tinymce-4.2.8/js/tinymce/plugins/anchor/plugin.min.js deleted file mode 100644 index 0dd4774..0000000 --- a/tinymce-4.2.8/js/tinymce/plugins/anchor/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -tinymce.PluginManager.add("anchor",function(a){function b(){var b=a.selection.getNode(),c="",d="A"==b.tagName&&""===a.dom.getAttrib(b,"href");d&&(c=b.name||b.id||""),a.windowManager.open({title:"Anchor",body:{type:"textbox",name:"name",size:40,label:"Name",value:c},onsubmit:function(c){var e=c.data.name;d?b.id=e:(a.selection.collapse(!0),a.execCommand("mceInsertContent",!1,a.dom.createHTML("a",{id:e})))}})}a.addCommand("mceAnchor",b),a.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:b,stateSelector:"a:not([href])"}),a.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:b})}); \ No newline at end of file diff --git a/tinymce-4.2.8/js/tinymce/plugins/autolink/plugin.min.js b/tinymce-4.2.8/js/tinymce/plugins/autolink/plugin.min.js deleted file mode 100644 index 547eea7..0000000 --- a/tinymce-4.2.8/js/tinymce/plugins/autolink/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -tinymce.PluginManager.add("autolink",function(a){function b(a){e(a,-1,"(",!0)}function c(a){e(a,0,"",!0)}function d(a){e(a,-1,"",!1)}function e(a,b,c){function d(a,b){if(0>b&&(b=0),3==a.nodeType){var c=a.data.length;b>c&&(b=c)}return b}function e(a,b){1!=a.nodeType||a.hasChildNodes()?g.setStart(a,d(a,b)):g.setStartBefore(a)}function f(a,b){1!=a.nodeType||a.hasChildNodes()?g.setEnd(a,d(a,b)):g.setEndAfter(a)}var g,h,i,j,k,l,m,n,o,p;if("A"!=a.selection.getNode().tagName){if(g=a.selection.getRng(!0).cloneRange(),g.startOffset<5){if(n=g.endContainer.previousSibling,!n){if(!g.endContainer.firstChild||!g.endContainer.firstChild.nextSibling)return;n=g.endContainer.firstChild.nextSibling}if(o=n.length,e(n,o),f(n,o),g.endOffset<5)return;h=g.endOffset,j=n}else{if(j=g.endContainer,3!=j.nodeType&&j.firstChild){for(;3!=j.nodeType&&j.firstChild;)j=j.firstChild;3==j.nodeType&&(e(j,0),f(j,j.nodeValue.length))}h=1==g.endOffset?2:g.endOffset-1-b}i=h;do e(j,h>=2?h-2:0),f(j,h>=1?h-1:0),h-=1,p=g.toString();while(" "!=p&&""!==p&&160!=p.charCodeAt(0)&&h-2>=0&&p!=c);g.toString()==c||160==g.toString().charCodeAt(0)?(e(j,h),f(j,i),h+=1):0===g.startOffset?(e(j,0),f(j,i)):(e(j,h),f(j,i)),l=g.toString(),"."==l.charAt(l.length-1)&&f(j,i-1),l=g.toString(),m=l.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i),m&&("www."==m[1]?m[1]="http://www.":/@$/.test(m[1])&&!/^mailto:/.test(m[1])&&(m[1]="mailto:"+m[1]),k=a.selection.getBookmark(),a.selection.setRng(g),a.execCommand("createlink",!1,m[1]+m[2]),a.selection.moveToBookmark(k),a.nodeChanged())}}var f;return a.on("keydown",function(b){return 13==b.keyCode?d(a):void 0}),tinymce.Env.ie?void a.on("focus",function(){if(!f){f=!0;try{a.execCommand("AutoUrlDetect",!1,!0)}catch(b){}}}):(a.on("keypress",function(c){return 41==c.keyCode?b(a):void 0}),void a.on("keyup",function(b){return 32==b.keyCode?c(a):void 0}))}); \ No newline at end of file diff --git a/tinymce-4.2.8/js/tinymce/plugins/autoresize/plugin.min.js b/tinymce-4.2.8/js/tinymce/plugins/autoresize/plugin.min.js deleted file mode 100644 index 80d8431..0000000 --- a/tinymce-4.2.8/js/tinymce/plugins/autoresize/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -tinymce.PluginManager.add("autoresize",function(a){function b(){return a.plugins.fullscreen&&a.plugins.fullscreen.isFullscreen()}function c(d){var g,h,i,j,k,l,m,n,o,p,q,r,s=tinymce.DOM;if(h=a.getDoc()){if(i=h.body,j=h.documentElement,k=e.autoresize_min_height,!i||d&&"setcontent"===d.type&&d.initial||b())return void(i&&j&&(i.style.overflowY="auto",j.style.overflowY="auto"));m=a.dom.getStyle(i,"margin-top",!0),n=a.dom.getStyle(i,"margin-bottom",!0),o=a.dom.getStyle(i,"padding-top",!0),p=a.dom.getStyle(i,"padding-bottom",!0),q=a.dom.getStyle(i,"border-top-width",!0),r=a.dom.getStyle(i,"border-bottom-width",!0),l=i.offsetHeight+parseInt(m,10)+parseInt(n,10)+parseInt(o,10)+parseInt(p,10)+parseInt(q,10)+parseInt(r,10),(isNaN(l)||0>=l)&&(l=tinymce.Env.ie?i.scrollHeight:tinymce.Env.webkit&&0===i.clientHeight?0:i.offsetHeight),l>e.autoresize_min_height&&(k=l),e.autoresize_max_height&&l>e.autoresize_max_height?(k=e.autoresize_max_height,i.style.overflowY="auto",j.style.overflowY="auto"):(i.style.overflowY="hidden",j.style.overflowY="hidden",i.scrollTop=0),k!==f&&(g=k-f,s.setStyle(a.iframeElement,"height",k+"px"),f=k,tinymce.isWebKit&&0>g&&c(d))}}function d(a,b,e){setTimeout(function(){c({}),a--?d(a,b,e):e&&e()},b)}var e=a.settings,f=0;a.settings.inline||(e.autoresize_min_height=parseInt(a.getParam("autoresize_min_height",a.getElement().offsetHeight),10),e.autoresize_max_height=parseInt(a.getParam("autoresize_max_height",0),10),a.on("init",function(){var b,c;b=a.getParam("autoresize_overflow_padding",1),c=a.getParam("autoresize_bottom_margin",50),b!==!1&&a.dom.setStyles(a.getBody(),{paddingLeft:b,paddingRight:b}),c!==!1&&a.dom.setStyles(a.getBody(),{paddingBottom:c})}),a.on("nodechange setcontent keyup FullscreenStateChanged",c),a.getParam("autoresize_on_init",!0)&&a.on("init",function(){d(20,100,function(){d(5,1e3)})}),a.addCommand("mceAutoResize",c))}); \ No newline at end of file diff --git a/tinymce-4.2.8/js/tinymce/plugins/autosave/plugin.min.js b/tinymce-4.2.8/js/tinymce/plugins/autosave/plugin.min.js deleted file mode 100644 index 11de44d..0000000 --- a/tinymce-4.2.8/js/tinymce/plugins/autosave/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -tinymce._beforeUnloadHandler=function(){var a;return tinymce.each(tinymce.editors,function(b){b.plugins.autosave&&b.plugins.autosave.storeDraft(),!a&&b.isDirty()&&b.getParam("autosave_ask_before_unload",!0)&&(a=b.translate("You have unsaved changes are you sure you want to navigate away?"))}),a},tinymce.PluginManager.add("autosave",function(a){function b(a,b){var c={s:1e3,m:6e4};return a=/^(\d+)([ms]?)$/.exec(""+(a||b)),(a[2]?c[a[2]]:1)*parseInt(a,10)}function c(){var a=parseInt(n.getItem(k+"time"),10)||0;return(new Date).getTime()-a>m.autosave_retention?(d(!1),!1):!0}function d(b){n.removeItem(k+"draft"),n.removeItem(k+"time"),b!==!1&&a.fire("RemoveDraft")}function e(){!j()&&a.isDirty()&&(n.setItem(k+"draft",a.getContent({format:"raw",no_events:!0})),n.setItem(k+"time",(new Date).getTime()),a.fire("StoreDraft"))}function f(){c()&&(a.setContent(n.getItem(k+"draft"),{format:"raw"}),a.fire("RestoreDraft"))}function g(){l||(setInterval(function(){a.removed||e()},m.autosave_interval),l=!0)}function h(){var b=this;b.disabled(!c()),a.on("StoreDraft RestoreDraft RemoveDraft",function(){b.disabled(!c())}),g()}function i(){a.undoManager.beforeChange(),f(),d(),a.undoManager.add()}function j(b){var c=a.settings.forced_root_block;return b=tinymce.trim("undefined"==typeof b?a.getBody().innerHTML:b),""===b||new RegExp("^<"+c+"[^>]*>((\xa0| |[ ]|]*>)+?|)|
$","i").test(b)}var k,l,m=a.settings,n=tinymce.util.LocalStorage;k=m.autosave_prefix||"tinymce-autosave-{path}{query}-{id}-",k=k.replace(/\{path\}/g,document.location.pathname),k=k.replace(/\{query\}/g,document.location.search),k=k.replace(/\{id\}/g,a.id),m.autosave_interval=b(m.autosave_interval,"30s"),m.autosave_retention=b(m.autosave_retention,"20m"),a.addButton("restoredraft",{title:"Restore last draft",onclick:i,onPostRender:h}),a.addMenuItem("restoredraft",{text:"Restore last draft",onclick:i,onPostRender:h,context:"file"}),a.settings.autosave_restore_when_empty!==!1&&(a.on("init",function(){c()&&j()&&f()}),a.on("saveContent",function(){d()})),window.onbeforeunload=tinymce._beforeUnloadHandler,this.hasDraft=c,this.storeDraft=e,this.restoreDraft=f,this.removeDraft=d,this.isEmpty=j}); \ No newline at end of file diff --git a/tinymce-4.2.8/js/tinymce/plugins/bbcode/plugin.min.js b/tinymce-4.2.8/js/tinymce/plugins/bbcode/plugin.min.js deleted file mode 100644 index 4548e5e..0000000 --- a/tinymce-4.2.8/js/tinymce/plugins/bbcode/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a){var b=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.on("beforeSetContent",function(a){a.content=b["_"+c+"_bbcode2html"](a.content)}),a.on("postProcess",function(a){a.set&&(a.content=b["_"+c+"_bbcode2html"](a.content)),a.get&&(a.content=b["_"+c+"_html2bbcode"](a.content))})},getInfo:function(){return{longname:"BBCode Plugin",author:"Ephox Corp",authorurl:"http://www.tinymce.com",infourl:"http://www.tinymce.com/wiki.php/Plugin:bbcode"}},_punbb_html2bbcode:function(a){function b(b,c){a=a.replace(b,c)}return a=tinymce.trim(a),b(/(.*?)<\/a>/gi,"[url=$1]$2[/url]"),b(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),b(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),b(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),b(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),b(/(.*?)<\/span>/gi,"[color=$1]$2[/color]"),b(/(.*?)<\/font>/gi,"[color=$1]$2[/color]"),b(/(.*?)<\/span>/gi,"[size=$1]$2[/size]"),b(/(.*?)<\/font>/gi,"$1"),b(//gi,"[img]$1[/img]"),b(/(.*?)<\/span>/gi,"[code]$1[/code]"),b(/(.*?)<\/span>/gi,"[quote]$1[/quote]"),b(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),b(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),b(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),b(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),b(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),b(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),b(/<\/(strong|b)>/gi,"[/b]"),b(/<(strong|b)>/gi,"[b]"),b(/<\/(em|i)>/gi,"[/i]"),b(/<(em|i)>/gi,"[i]"),b(/<\/u>/gi,"[/u]"),b(/(.*?)<\/span>/gi,"[u]$1[/u]"),b(//gi,"[u]"),b(/]*>/gi,"[quote]"),b(/<\/blockquote>/gi,"[/quote]"),b(/
/gi,"\n"),b(//gi,"\n"),b(/
/gi,"\n"),b(/

/gi,""),b(/<\/p>/gi,"\n"),b(/ |\u00a0/gi," "),b(/"/gi,'"'),b(/</gi,"<"),b(/>/gi,">"),b(/&/gi,"&"),a},_punbb_bbcode2html:function(a){function b(b,c){a=a.replace(b,c)}return a=tinymce.trim(a),b(/\n/gi,"
"),b(/\[b\]/gi,""),b(/\[\/b\]/gi,""),b(/\[i\]/gi,""),b(/\[\/i\]/gi,""),b(/\[u\]/gi,""),b(/\[\/u\]/gi,""),b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'$2'),b(/\[url\](.*?)\[\/url\]/gi,'$1'),b(/\[img\](.*?)\[\/img\]/gi,''),b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'$2'),b(/\[code\](.*?)\[\/code\]/gi,'$1 '),b(/\[quote.*?\](.*?)\[\/quote\]/gi,'$1 '),a}}),tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)}(); \ No newline at end of file diff --git a/tinymce-4.2.8/js/tinymce/plugins/charmap/plugin.min.js b/tinymce-4.2.8/js/tinymce/plugins/charmap/plugin.min.js deleted file mode 100644 index 71f3bbe..0000000 --- a/tinymce-4.2.8/js/tinymce/plugins/charmap/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -tinymce.PluginManager.add("charmap",function(a){function b(){function b(a){for(;a;){if("TD"==a.nodeName)return a;a=a.parentNode}}var d,e,f,g;d='';var h=25,i=Math.ceil(c.length/h);for(f=0;i>f;f++){for(d+="",e=0;h>e;e++){var j=f*h+e;if(j
'+(k?String.fromCharCode(parseInt(k[0],10)):" ")+"
"}else d+="
"}d+="";var l={type:"container",html:d,onclick:function(c){var d=c.target;/^(TD|DIV)$/.test(d.nodeName)&&b(d).firstChild&&(a.execCommand("mceInsertContent",!1,tinymce.trim(d.innerText||d.textContent)),c.ctrlKey||g.close())},onmouseover:function(a){var c=b(a.target);c&&c.firstChild?(g.find("#preview").text(c.firstChild.firstChild.data),g.find("#previewTitle").text(c.title)):(g.find("#preview").text(" "),g.find("#previewTitle").text(" "))}};g=a.windowManager.open({title:"Special character",spacing:10,padding:10,items:[l,{type:"container",layout:"flex",direction:"column",align:"center",spacing:5,minWidth:160,minHeight:160,items:[{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:140,minHeight:80},{type:"label",name:"previewTitle",text:" ",style:"text-align: center",border:1,minWidth:140,minHeight:80}]}],buttons:[{text:"Close",onclick:function(){g.close()}}]})}var c=[["160","no-break space"],["173","soft hyphen"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["221","Y - acute"],["376","Y - diaeresis"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"]];a.addCommand("mceShowCharmap",b),a.addButton("charmap",{icon:"charmap",tooltip:"Special character",cmd:"mceShowCharmap"}),a.addMenuItem("charmap",{icon:"charmap",text:"Special character",cmd:"mceShowCharmap",context:"insert"})}); \ No newline at end of file diff --git a/tinymce-4.2.8/js/tinymce/plugins/code/plugin.min.js b/tinymce-4.2.8/js/tinymce/plugins/code/plugin.min.js deleted file mode 100644 index d6331f8..0000000 --- a/tinymce-4.2.8/js/tinymce/plugins/code/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -tinymce.PluginManager.add("code",function(a){function b(){var b=a.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:a.getParam("code_dialog_width",600),minHeight:a.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(b){a.focus(),a.undoManager.transact(function(){a.setContent(b.data.code)}),a.selection.setCursorLocation(),a.nodeChanged()}});b.find("#code").value(a.getContent({source_view:!0}))}a.addCommand("mceCodeEditor",b),a.addButton("code",{icon:"code",tooltip:"Source code",onclick:b}),a.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:b})}); \ No newline at end of file diff --git a/tinymce-4.2.8/js/tinymce/plugins/colorpicker/plugin.min.js b/tinymce-4.2.8/js/tinymce/plugins/colorpicker/plugin.min.js deleted file mode 100644 index 66ea69c..0000000 --- a/tinymce-4.2.8/js/tinymce/plugins/colorpicker/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -tinymce.PluginManager.add("colorpicker",function(a){function b(b,c){function d(a){var b=new tinymce.util.Color(a),c=b.toRgb();f.fromJSON({r:c.r,g:c.g,b:c.b,hex:b.toHex().substr(1)}),e(b.toHex())}function e(a){f.find("#preview")[0].getEl().style.background=a}var f=a.windowManager.open({title:"Color",items:{type:"container",layout:"flex",direction:"row",align:"stretch",padding:5,spacing:10,items:[{type:"colorpicker",value:c,onchange:function(){var a=this.rgb();f&&(f.find("#r").value(a.r),f.find("#g").value(a.g),f.find("#b").value(a.b),f.find("#hex").value(this.value().substr(1)),e(this.value()))}},{type:"form",padding:0,labelGap:5,defaults:{type:"textbox",size:7,value:"0",flex:1,spellcheck:!1,onchange:function(){var a,b,c=f.find("colorpicker")[0];return a=this.name(),b=this.value(),"hex"==a?(b="#"+b,d(b),void c.value(b)):(b={r:f.find("#r").value(),g:f.find("#g").value(),b:f.find("#b").value()},c.value(b),void d(b))}},items:[{name:"r",label:"R",autofocus:1},{name:"g",label:"G"},{name:"b",label:"B"},{name:"hex",label:"#",value:"000000"},{name:"preview",type:"container",border:1}]}]},onSubmit:function(){b("#"+this.toJSON().hex)}});d(c)}a.settings.color_picker_callback||(a.settings.color_picker_callback=b)}); \ No newline at end of file diff --git a/tinymce-4.2.8/js/tinymce/plugins/contextmenu/plugin.min.js b/tinymce-4.2.8/js/tinymce/plugins/contextmenu/plugin.min.js deleted file mode 100644 index 20274a6..0000000 --- a/tinymce-4.2.8/js/tinymce/plugins/contextmenu/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -tinymce.PluginManager.add("contextmenu",function(a){var b,c=a.settings.contextmenu_never_use_native;a.on("contextmenu",function(d){var e,f=a.getDoc();if(!d.ctrlKey||c){if(d.preventDefault(),tinymce.Env.mac&&tinymce.Env.webkit&&2==d.button&&f.caretRangeFromPoint&&a.selection.setRng(f.caretRangeFromPoint(d.x,d.y)),e=a.settings.contextmenu||"link image inserttable | cell row column deletetable",b)b.show();else{var g=[];tinymce.each(e.split(/[ ,]/),function(b){var c=a.menuItems[b];"|"==b&&(c={text:b}),c&&(c.shortcut="",g.push(c))});for(var h=0;h'}),a+=""}),a+=""}var d=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]];a.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:c,onclick:function(b){var c=a.dom.getParent(b.target,"a");c&&(a.insertContent(''+c.getAttribute('),this.hide())}},tooltip:"Emoticons"})}); \ No newline at end of file diff --git a/tinymce-4.2.8/js/tinymce/plugins/example/dialog.html b/tinymce-4.2.8/js/tinymce/plugins/example/dialog.html deleted file mode 100644 index 565f06f..0000000 --- a/tinymce-4.2.8/js/tinymce/plugins/example/dialog.html +++ /dev/null @@ -1,8 +0,0 @@ - - - -

Custom dialog

- Input some text: - - - \ No newline at end of file diff --git a/tinymce-4.2.8/js/tinymce/plugins/example/plugin.min.js b/tinymce-4.2.8/js/tinymce/plugins/example/plugin.min.js deleted file mode 100644 index 88687c7..0000000 --- a/tinymce-4.2.8/js/tinymce/plugins/example/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -tinymce.PluginManager.add("example",function(a,b){a.addButton("example",{text:"My button",icon:!1,onclick:function(){a.windowManager.open({title:"Example plugin",body:[{type:"textbox",name:"title",label:"Title"}],onsubmit:function(b){a.insertContent("Title: "+b.data.title)}})}}),a.addMenuItem("example",{text:"Example plugin",context:"tools",onclick:function(){a.windowManager.open({title:"TinyMCE site",url:b+"/dialog.html",width:600,height:400,buttons:[{text:"Insert",onclick:function(){var b=a.windowManager.getWindows()[0];a.insertContent(b.getContentWindow().document.getElementById("content").value),b.close()}},{text:"Close",onclick:"close"}]})}})}); \ No newline at end of file diff --git a/tinymce-4.2.8/js/tinymce/plugins/example_dependency/plugin.min.js b/tinymce-4.2.8/js/tinymce/plugins/example_dependency/plugin.min.js deleted file mode 100644 index e61bf47..0000000 --- a/tinymce-4.2.8/js/tinymce/plugins/example_dependency/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -tinymce.PluginManager.add("example_dependency",function(){},["example"]); \ No newline at end of file diff --git a/tinymce-4.2.8/js/tinymce/plugins/fullpage/plugin.min.js b/tinymce-4.2.8/js/tinymce/plugins/fullpage/plugin.min.js deleted file mode 100644 index 1ea5c36..0000000 --- a/tinymce-4.2.8/js/tinymce/plugins/fullpage/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -tinymce.PluginManager.add("fullpage",function(a){function b(){var b=c();a.windowManager.open({title:"Document properties",data:b,defaults:{type:"textbox",size:40},body:[{name:"title",label:"Title"},{name:"keywords",label:"Keywords"},{name:"description",label:"Description"},{name:"robots",label:"Robots"},{name:"author",label:"Author"},{name:"docencoding",label:"Encoding"}],onSubmit:function(a){d(tinymce.extend(b,a.data))}})}function c(){function b(a,b){var c=a.attr(b);return c||""}var c,d,f=e(),g={};return g.fontface=a.getParam("fullpage_default_fontface",""),g.fontsize=a.getParam("fullpage_default_fontsize",""),c=f.firstChild,7==c.type&&(g.xml_pi=!0,d=/encoding="([^"]+)"/.exec(c.value),d&&(g.docencoding=d[1])),c=f.getAll("#doctype")[0],c&&(g.doctype=""),c=f.getAll("title")[0],c&&c.firstChild&&(g.title=c.firstChild.value),k(f.getAll("meta"),function(a){var b,c=a.attr("name"),d=a.attr("http-equiv");c?g[c.toLowerCase()]=a.attr("content"):"Content-Type"==d&&(b=/charset\s*=\s*(.*)\s*/gi.exec(a.attr("content")),b&&(g.docencoding=b[1]))}),c=f.getAll("html")[0],c&&(g.langcode=b(c,"lang")||b(c,"xml:lang")),g.stylesheets=[],tinymce.each(f.getAll("link"),function(a){"stylesheet"==a.attr("rel")&&g.stylesheets.push(a.attr("href"))}),c=f.getAll("body")[0],c&&(g.langdir=b(c,"dir"),g.style=b(c,"style"),g.visited_color=b(c,"vlink"),g.link_color=b(c,"link"),g.active_color=b(c,"alink")),g}function d(b){function c(a,b,c){a.attr(b,c?c:void 0)}function d(a){g.firstChild?g.insert(a,g.firstChild):g.append(a)}var f,g,h,j,m,n=a.dom;f=e(),g=f.getAll("head")[0],g||(j=f.getAll("html")[0],g=new l("head",1),j.firstChild?j.insert(g,j.firstChild,!0):j.append(g)),j=f.firstChild,b.xml_pi?(m='version="1.0"',b.docencoding&&(m+=' encoding="'+b.docencoding+'"'),7!=j.type&&(j=new l("xml",7),f.insert(j,f.firstChild,!0)),j.value=m):j&&7==j.type&&j.remove(),j=f.getAll("#doctype")[0],b.doctype?(j||(j=new l("#doctype",10),b.xml_pi?f.insert(j,f.firstChild):d(j)),j.value=b.doctype.substring(9,b.doctype.length-1)):j&&j.remove(),j=null,k(f.getAll("meta"),function(a){"Content-Type"==a.attr("http-equiv")&&(j=a)}),b.docencoding?(j||(j=new l("meta",1),j.attr("http-equiv","Content-Type"),j.shortEnded=!0,d(j)),j.attr("content","text/html; charset="+b.docencoding)):j&&j.remove(),j=f.getAll("title")[0],b.title?(j?j.empty():(j=new l("title",1),d(j)),j.append(new l("#text",3)).value=b.title):j&&j.remove(),k("keywords,description,author,copyright,robots".split(","),function(a){var c,e,g=f.getAll("meta"),h=b[a];for(c=0;c"))}function e(){return new tinymce.html.DomParser({validate:!1,root_name:"#document"}).parse(i)}function f(b){function c(a){return a.replace(/<\/?[A-Z]+/g,function(a){return a.toLowerCase()})}var d,f,h,l,m=b.content,n="",o=a.dom;if(!b.selection&&!("raw"==b.format&&i||b.source_view&&a.getParam("fullpage_hide_in_source_view"))){0!==m.length||b.source_view||(m=tinymce.trim(i)+"\n"+tinymce.trim(m)+"\n"+tinymce.trim(j)),m=m.replace(/<(\/?)BODY/gi,"<$1body"),d=m.indexOf("",d),i=c(m.substring(0,d+1)),f=m.indexOf("\n"),h=e(),k(h.getAll("style"),function(a){a.firstChild&&(n+=a.firstChild.value)}),l=h.getAll("body")[0],l&&o.setAttribs(a.getBody(),{style:l.attr("style")||"",dir:l.attr("dir")||"",vLink:l.attr("vlink")||"",link:l.attr("link")||"",aLink:l.attr("alink")||""}),o.remove("fullpage_styles");var p=a.getDoc().getElementsByTagName("head")[0];n&&(o.add(p,"style",{id:"fullpage_styles"},n),l=o.get("fullpage_styles"),l.styleSheet&&(l.styleSheet.cssText=n));var q={};tinymce.each(p.getElementsByTagName("link"),function(a){"stylesheet"==a.rel&&a.getAttribute("data-mce-fullpage")&&(q[a.href]=a)}),tinymce.each(h.getAll("link"),function(a){var b=a.attr("href");q[b]||"stylesheet"!=a.attr("rel")||o.add(p,"link",{rel:"stylesheet",text:"text/css",href:b,"data-mce-fullpage":"1"}),delete q[b]}),tinymce.each(q,function(a){a.parentNode.removeChild(a)})}}function g(){var b,c="",d="";return a.getParam("fullpage_default_xml_pi")&&(c+='\n'),c+=a.getParam("fullpage_default_doctype",""),c+="\n\n\n",(b=a.getParam("fullpage_default_title"))&&(c+=""+b+"\n"),(b=a.getParam("fullpage_default_encoding"))&&(c+='\n'),(b=a.getParam("fullpage_default_font_family"))&&(d+="font-family: "+b+";"),(b=a.getParam("fullpage_default_font_size"))&&(d+="font-size: "+b+";"),(b=a.getParam("fullpage_default_text_color"))&&(d+="color: "+b+";"),c+="\n\n"}function h(b){b.selection||b.source_view&&a.getParam("fullpage_hide_in_source_view")||(b.content=tinymce.trim(i)+"\n"+tinymce.trim(b.content)+"\n"+tinymce.trim(j))}var i,j,k=tinymce.each,l=tinymce.html.Node;a.addCommand("mceFullPageProperties",b),a.addButton("fullpage",{title:"Document properties",cmd:"mceFullPageProperties"}),a.addMenuItem("fullpage",{text:"Document properties",cmd:"mceFullPageProperties",context:"file"}),a.on("BeforeSetContent",f),a.on("GetContent",h)}); \ No newline at end of file diff --git a/tinymce-4.2.8/js/tinymce/plugins/fullscreen/plugin.min.js b/tinymce-4.2.8/js/tinymce/plugins/fullscreen/plugin.min.js deleted file mode 100644 index d275e05..0000000 --- a/tinymce-4.2.8/js/tinymce/plugins/fullscreen/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -tinymce.PluginManager.add("fullscreen",function(a){function b(){var a,b,c=window,d=document,e=d.body;return e.offsetWidth&&(a=e.offsetWidth,b=e.offsetHeight),c.innerWidth&&c.innerHeight&&(a=c.innerWidth,b=c.innerHeight),{w:a,h:b}}function c(){function c(){j.setStyle(m,"height",b().h-(l.clientHeight-m.clientHeight))}var k,l,m,n,o=document.body,p=document.documentElement;i=!i,l=a.getContainer(),k=l.style,m=a.getContentAreaContainer().firstChild,n=m.style,i?(d=n.width,e=n.height,n.width=n.height="100%",g=k.width,h=k.height,k.width=k.height="",j.addClass(o,"mce-fullscreen"),j.addClass(p,"mce-fullscreen"),j.addClass(l,"mce-fullscreen"),j.bind(window,"resize",c),c(),f=c):(n.width=d,n.height=e,g&&(k.width=g),h&&(k.height=h),j.removeClass(o,"mce-fullscreen"),j.removeClass(p,"mce-fullscreen"),j.removeClass(l,"mce-fullscreen"),j.unbind(window,"resize",f)),a.fire("FullscreenStateChanged",{state:i})}var d,e,f,g,h,i=!1,j=tinymce.DOM;return a.settings.inline?void 0:(a.on("init",function(){a.addShortcut("Meta+Alt+F","",c)}),a.on("remove",function(){f&&j.unbind(window,"resize",f)}),a.addCommand("mceFullScreen",c),a.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Meta+Alt+F",selectable:!0,onClick:c,onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})},context:"view"}),a.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Meta+Alt+F",onClick:c,onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})}}),{isFullscreen:function(){return i}})}); \ No newline at end of file diff --git a/tinymce-4.2.8/js/tinymce/plugins/hr/plugin.min.js b/tinymce-4.2.8/js/tinymce/plugins/hr/plugin.min.js deleted file mode 100644 index 25abb0c..0000000 --- a/tinymce-4.2.8/js/tinymce/plugins/hr/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -tinymce.PluginManager.add("hr",function(a){a.addCommand("InsertHorizontalRule",function(){a.execCommand("mceInsertContent",!1,"
")}),a.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),a.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})}); \ No newline at end of file diff --git a/tinymce-4.2.8/js/tinymce/plugins/image/plugin.min.js b/tinymce-4.2.8/js/tinymce/plugins/image/plugin.min.js deleted file mode 100644 index 1f28d9b..0000000 --- a/tinymce-4.2.8/js/tinymce/plugins/image/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -tinymce.PluginManager.add("image",function(a){function b(a,b){function c(a,c){d.parentNode&&d.parentNode.removeChild(d),b({width:a,height:c})}var d=document.createElement("img");d.onload=function(){c(Math.max(d.width,d.clientWidth),Math.max(d.height,d.clientHeight))},d.onerror=function(){c()};var e=d.style;e.visibility="hidden",e.position="fixed",e.bottom=e.left=0,e.width=e.height="auto",document.body.appendChild(d),d.src=a}function c(a,b,c){function d(a,c){return c=c||[],tinymce.each(a,function(a){var e={text:a.text||a.title};a.menu?e.menu=d(a.menu):(e.value=a.value,b(e)),c.push(e)}),c}return d(a,c||[])}function d(b){return function(){var c=a.settings.image_list;"string"==typeof c?tinymce.util.XHR.send({url:c,success:function(a){b(tinymce.util.JSON.parse(a))}}):"function"==typeof c?c(b):b(c)}}function e(d){function e(){var a,b,c,d;a=l.find("#width")[0],b=l.find("#height")[0],a&&b&&(c=a.value(),d=b.value(),l.find("#constrain")[0].checked()&&m&&n&&c&&d&&(m!=c?(d=Math.round(c/m*d),isNaN(d)||b.value(d)):(c=Math.round(d/n*c),isNaN(c)||a.value(c))),m=c,n=d)}function f(){function b(b){function c(){b.onload=b.onerror=null,a.selection&&(a.selection.select(b),a.nodeChanged())}b.onload=function(){q.width||q.height||!t||r.setAttribs(b,{width:b.clientWidth,height:b.clientHeight}),c()},b.onerror=c}j(),e(),q=tinymce.extend(q,l.toJSON()),q.alt||(q.alt=""),q.title||(q.title=""),""===q.width&&(q.width=null),""===q.height&&(q.height=null),q.style||(q.style=null),q={src:q.src,alt:q.alt,title:q.title,width:q.width,height:q.height,style:q.style,"class":q["class"]},a.undoManager.transact(function(){return q.src?(""===q.title&&(q.title=null),s?(r.setAttribs(s,q),a.editorUpload.uploadImagesAuto()):(q.id="__mcenew",a.focus(),a.selection.setContent(r.createHTML("img",q)),s=r.get("__mcenew"),r.setAttrib(s,"id",null)),void b(s)):void(s&&(r.remove(s),a.focus(),a.nodeChanged()))})}function g(a){return a&&(a=a.replace(/px$/,"")),a}function h(c){var d,e,f,g=c.meta||{};o&&o.value(a.convertURL(this.value(),"src")),tinymce.each(g,function(a,b){l.find("#"+b).value(a)}),g.width||g.height||(d=a.convertURL(this.value(),"src"),e=a.settings.image_prepend_url,f=new RegExp("^(?:[a-z]+:)?//","i"),e&&!f.test(d)&&d.substring(0,e.length)!==e&&(d=e+d),this.value(d),b(a.documentBaseURI.toAbsolute(this.value()),function(a){a.width&&a.height&&t&&(m=a.width,n=a.height,l.find("#width").value(m),l.find("#height").value(n))}))}function i(a){if(a.margin){var b=a.margin.split(" ");switch(b.length){case 1:a["margin-top"]=a["margin-top"]||b[0],a["margin-right"]=a["margin-right"]||b[0],a["margin-bottom"]=a["margin-bottom"]||b[0],a["margin-left"]=a["margin-left"]||b[0];break;case 2:a["margin-top"]=a["margin-top"]||b[0],a["margin-right"]=a["margin-right"]||b[1],a["margin-bottom"]=a["margin-bottom"]||b[0],a["margin-left"]=a["margin-left"]||b[1];break;case 3:a["margin-top"]=a["margin-top"]||b[0],a["margin-right"]=a["margin-right"]||b[1],a["margin-bottom"]=a["margin-bottom"]||b[2],a["margin-left"]=a["margin-left"]||b[1];break;case 4:a["margin-top"]=a["margin-top"]||b[0],a["margin-right"]=a["margin-right"]||b[1],a["margin-bottom"]=a["margin-bottom"]||b[2],a["margin-left"]=a["margin-left"]||b[3]}delete a.margin}return a}function j(){function b(a){return a.length>0&&/^[0-9]+$/.test(a)&&(a+="px"),a}if(a.settings.image_advtab){var c=l.toJSON(),d=r.parseStyle(c.style);d=i(d),c.vspace&&(d["margin-top"]=d["margin-bottom"]=b(c.vspace)),c.hspace&&(d["margin-left"]=d["margin-right"]=b(c.hspace)),c.border&&(d["border-width"]=b(c.border)),l.find("#style").value(r.serializeStyle(r.parseStyle(r.serializeStyle(d))))}}function k(){if(a.settings.image_advtab){var b=l.toJSON(),c=r.parseStyle(b.style);l.find("#vspace").value(""),l.find("#hspace").value(""),c=i(c),(c["margin-top"]&&c["margin-bottom"]||c["margin-right"]&&c["margin-left"])&&(c["margin-top"]===c["margin-bottom"]?l.find("#vspace").value(g(c["margin-top"])):l.find("#vspace").value(""),c["margin-right"]===c["margin-left"]?l.find("#hspace").value(g(c["margin-right"])):l.find("#hspace").value("")),c["border-width"]&&l.find("#border").value(g(c["border-width"])),l.find("#style").value(r.serializeStyle(r.parseStyle(r.serializeStyle(c))))}}var l,m,n,o,p,q={},r=a.dom,s=a.selection.getNode(),t=a.settings.image_dimensions!==!1;m=r.getAttrib(s,"width"),n=r.getAttrib(s,"height"),"IMG"!=s.nodeName||s.getAttribute("data-mce-object")||s.getAttribute("data-mce-placeholder")?s=null:q={src:r.getAttrib(s,"src"),alt:r.getAttrib(s,"alt"),title:r.getAttrib(s,"title"),"class":r.getAttrib(s,"class"),width:m,height:n},d&&(o={type:"listbox",label:"Image list",values:c(d,function(b){b.value=a.convertURL(b.value||b.url,"src")},[{text:"None",value:""}]),value:q.src&&a.convertURL(q.src,"src"),onselect:function(a){var b=l.find("#alt");(!b.value()||a.lastControl&&b.value()==a.lastControl.text())&&b.value(a.control.text()),l.find("#src").value(a.control.value()).fire("change")},onPostRender:function(){o=this}}),a.settings.image_class_list&&(p={name:"class",type:"listbox",label:"Class",values:c(a.settings.image_class_list,function(b){b.value&&(b.textStyle=function(){return a.formatter.getCssText({inline:"img",classes:[b.value]})})})});var u=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:h},o];a.settings.image_description!==!1&&u.push({name:"alt",type:"textbox",label:"Image description"}),a.settings.image_title&&u.push({name:"title",type:"textbox",label:"Image Title"}),t&&u.push({type:"container",label:"Dimensions",layout:"flex",direction:"row",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:3,onchange:e,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:3,onchange:e,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}),u.push(p),a.settings.image_advtab?(s&&(s.style.marginLeft&&s.style.marginRight&&s.style.marginLeft===s.style.marginRight&&(q.hspace=g(s.style.marginLeft)),s.style.marginTop&&s.style.marginBottom&&s.style.marginTop===s.style.marginBottom&&(q.vspace=g(s.style.marginTop)),s.style.borderWidth&&(q.border=g(s.style.borderWidth)),q.style=a.dom.serializeStyle(a.dom.parseStyle(a.dom.getAttrib(s,"style")))),l=a.windowManager.open({title:"Insert/edit image",data:q,bodyType:"tabpanel",body:[{title:"General",type:"form",items:u},{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox",onchange:k},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,alignH:["left","right"],defaults:{type:"textbox",maxWidth:50,onchange:j},items:[{label:"Vertical space",name:"vspace"},{label:"Horizontal space",name:"hspace"},{label:"Border",name:"border"}]}]}],onSubmit:f})):l=a.windowManager.open({title:"Insert/edit image",data:q,body:u,onSubmit:f})}a.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:d(e),stateSelector:"img:not([data-mce-object],[data-mce-placeholder])"}),a.addMenuItem("image",{icon:"image",text:"Insert/edit image",onclick:d(e),context:"insert",prependToContext:!0}),a.addCommand("mceImage",d(e))}); \ No newline at end of file diff --git a/tinymce-4.2.8/js/tinymce/plugins/imagetools/plugin.min.js b/tinymce-4.2.8/js/tinymce/plugins/imagetools/plugin.min.js deleted file mode 100644 index 05a0bec..0000000 --- a/tinymce-4.2.8/js/tinymce/plugins/imagetools/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(a,b){"use strict";function c(a,b){for(var c,d=[],f=0;fe?360+e:e,(90==e||270==e)&&b.resize(g,g.height,g.width),(90==e||180==e)&&(j=g.width),(270==e||180==e)&&(k=g.height),i.translate(j,k),i.rotate(e*Math.PI/180),i.drawImage(f,0,0),h(f),a.canvasToBlob(g,d.type)})}function e(d,e){return a.blobToImage(d).then(function(d){var f=b.create(c.getWidth(d),c.getHeight(d)),g=b.get2dContext(f);return"v"==e?(g.scale(1,-1),g.drawImage(d,0,-f.height)):(g.scale(-1,1),g.drawImage(d,-f.width,0)),h(d),a.canvasToBlob(f)})}function f(c,d,e,f,g){return a.blobToImage(c).then(function(c){var i=b.create(f,g),j=b.get2dContext(i);return j.drawImage(c,-d,-e),h(c),a.canvasToBlob(i)})}function g(c,d,e){return a.blobToImage(c).then(function(f){var g=b.create(d,e),i=b.get2dContext(g);return i.drawImage(f,0,0,d,e),h(f),a.canvasToBlob(g,c.type)})}var h=a.revokeImageUrl;return{rotate:d,flip:e,crop:f,resize:g}}),d("tinymce/imagetoolsplugin/CropRect",["tinymce/dom/DomQuery","tinymce/ui/DragHelper","tinymce/ui/Rect","tinymce/util/Tools","tinymce/util/Observable"],function(a,b,c,d,e){var f=0;return function(g,h,i,j){function k(a,b){return{x:b.x+a.x,y:b.y+a.y,w:b.w,h:b.h}}function l(a,b){return{x:b.x-a.x,y:b.y-a.y,w:b.w,h:b.h}}function m(){return l(i,g)}function n(){function e(a){var d;return new b(A,{document:j.ownerDocument,handle:A+"-"+a.name,start:function(){d=g},drag:function(b){var e,f,h,j,k;e=d.x,f=d.y,h=d.w,j=d.h,e+=b.deltaX*a.deltaX,f+=b.deltaY*a.deltaY,h+=b.deltaX*a.deltaW,j+=b.deltaY*a.deltaH,20>h&&(h=20),20>j&&(j=20),k=g=c.clamp({x:e,y:f,w:h,h:j},i,"move"==a.name),k=l(i,k),v.fire("updateRect",{rect:k}),s(k)}})}a('
').appendTo(j),d.each(y,function(b){a("#"+A,j).append('