]*>/gi, "[quote]"); 79 | rep(/<\/blockquote>/gi, "[/quote]"); 80 | rep(/
/gi, "\n"); 81 | rep(/
/gi, "\n"); 82 | rep(/
/gi, "\n"); 83 | rep(//gi, ""); 84 | rep(/<\/p>/gi, "\n"); 85 | rep(/ |\u00a0/gi, " "); 86 | rep(/"/gi, "\""); 87 | rep(/</gi, "<"); 88 | rep(/>/gi, ">"); 89 | rep(/&/gi, "&"); 90 | 91 | return s; 92 | }, 93 | 94 | // BBCode -> HTML from PunBB dialect 95 | _punbb_bbcode2html: function(s) { 96 | s = tinymce.trim(s); 97 | 98 | function rep(re, str) { 99 | s = s.replace(re, str); 100 | } 101 | 102 | // example: [b] to 103 | rep(/\n/gi, "
"); 104 | rep(/\[b\]/gi, ""); 105 | rep(/\[\/b\]/gi, ""); 106 | rep(/\[i\]/gi, ""); 107 | rep(/\[\/i\]/gi, ""); 108 | rep(/\[u\]/gi, ""); 109 | rep(/\[\/u\]/gi, ""); 110 | rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi, "$2"); 111 | rep(/\[url\](.*?)\[\/url\]/gi, "$1"); 112 | rep(/\[img\](.*?)\[\/img\]/gi, ""); 113 | rep(/\[color=(.*?)\](.*?)\[\/color\]/gi, "$2"); 114 | rep(/\[code\](.*?)\[\/code\]/gi, "$1 "); 115 | rep(/\[quote.*?\](.*?)\[\/quote\]/gi, "$1 "); 116 | 117 | return s; 118 | } 119 | }); 120 | 121 | // Register plugin 122 | tinymce.PluginManager.add('bbcode', tinymce.plugins.BBCodePlugin); 123 | })(); -------------------------------------------------------------------------------- /devassets/tinymce/plugins/bbcode/plugin.min.js: -------------------------------------------------------------------------------- 1 | !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)}(); -------------------------------------------------------------------------------- /devassets/tinymce/plugins/charmap/plugin.min.js: -------------------------------------------------------------------------------- 1 | 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+="
";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"})}); -------------------------------------------------------------------------------- /devassets/tinymce/plugins/code/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * plugin.js 3 | * 4 | * Released under LGPL License. 5 | * Copyright (c) 1999-2015 Ephox Corp. All rights reserved 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /*global tinymce:true */ 12 | 13 | tinymce.PluginManager.add('code', function(editor) { 14 | function showDialog() { 15 | var win = editor.windowManager.open({ 16 | title: "Source code", 17 | body: { 18 | type: 'textbox', 19 | name: 'code', 20 | multiline: true, 21 | minWidth: editor.getParam("code_dialog_width", 600), 22 | minHeight: editor.getParam("code_dialog_height", Math.min(tinymce.DOM.getViewPort().h - 200, 500)), 23 | spellcheck: false, 24 | style: 'direction: ltr; text-align: left' 25 | }, 26 | onSubmit: function(e) { 27 | // We get a lovely "Wrong document" error in IE 11 if we 28 | // don't move the focus to the editor before creating an undo 29 | // transation since it tries to make a bookmark for the current selection 30 | editor.focus(); 31 | 32 | editor.undoManager.transact(function() { 33 | editor.setContent(e.data.code); 34 | }); 35 | 36 | editor.selection.setCursorLocation(); 37 | editor.nodeChanged(); 38 | } 39 | }); 40 | 41 | // Gecko has a major performance issue with textarea 42 | // contents so we need to set it when all reflows are done 43 | win.find('#code').value(editor.getContent({source_view: true})); 44 | } 45 | 46 | editor.addCommand("mceCodeEditor", showDialog); 47 | 48 | editor.addButton('code', { 49 | icon: 'code', 50 | tooltip: 'Source code', 51 | onclick: showDialog 52 | }); 53 | 54 | editor.addMenuItem('code', { 55 | icon: 'code', 56 | text: 'Source code', 57 | context: 'tools', 58 | onclick: showDialog 59 | }); 60 | }); -------------------------------------------------------------------------------- /devassets/tinymce/plugins/code/plugin.min.js: -------------------------------------------------------------------------------- 1 | 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})}); -------------------------------------------------------------------------------- /devassets/tinymce/plugins/colorpicker/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * plugin.js 3 | * 4 | * Released under LGPL License. 5 | * Copyright (c) 1999-2015 Ephox Corp. All rights reserved 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /*global tinymce:true */ 12 | 13 | tinymce.PluginManager.add('colorpicker', function(editor) { 14 | function colorPickerCallback(callback, value) { 15 | function setColor(value) { 16 | var color = new tinymce.util.Color(value), rgb = color.toRgb(); 17 | 18 | win.fromJSON({ 19 | r: rgb.r, 20 | g: rgb.g, 21 | b: rgb.b, 22 | hex: color.toHex().substr(1) 23 | }); 24 | 25 | showPreview(color.toHex()); 26 | } 27 | 28 | function showPreview(hexColor) { 29 | win.find('#preview')[0].getEl().style.background = hexColor; 30 | } 31 | 32 | var win = editor.windowManager.open({ 33 | title: 'Color', 34 | items: { 35 | type: 'container', 36 | layout: 'flex', 37 | direction: 'row', 38 | align: 'stretch', 39 | padding: 5, 40 | spacing: 10, 41 | items: [ 42 | { 43 | type: 'colorpicker', 44 | value: value, 45 | onchange: function() { 46 | var rgb = this.rgb(); 47 | 48 | if (win) { 49 | win.find('#r').value(rgb.r); 50 | win.find('#g').value(rgb.g); 51 | win.find('#b').value(rgb.b); 52 | win.find('#hex').value(this.value().substr(1)); 53 | showPreview(this.value()); 54 | } 55 | } 56 | }, 57 | { 58 | type: 'form', 59 | padding: 0, 60 | labelGap: 5, 61 | defaults: { 62 | type: 'textbox', 63 | size: 7, 64 | value: '0', 65 | flex: 1, 66 | spellcheck: false, 67 | onchange: function() { 68 | var colorPickerCtrl = win.find('colorpicker')[0]; 69 | var name, value; 70 | 71 | name = this.name(); 72 | value = this.value(); 73 | 74 | if (name == "hex") { 75 | value = '#' + value; 76 | setColor(value); 77 | colorPickerCtrl.value(value); 78 | return; 79 | } 80 | 81 | value = { 82 | r: win.find('#r').value(), 83 | g: win.find('#g').value(), 84 | b: win.find('#b').value() 85 | }; 86 | 87 | colorPickerCtrl.value(value); 88 | setColor(value); 89 | } 90 | }, 91 | items: [ 92 | {name: 'r', label: 'R', autofocus: 1}, 93 | {name: 'g', label: 'G'}, 94 | {name: 'b', label: 'B'}, 95 | {name: 'hex', label: '#', value: '000000'}, 96 | {name: 'preview', type: 'container', border: 1} 97 | ] 98 | } 99 | ] 100 | }, 101 | onSubmit: function() { 102 | callback('#' + this.toJSON().hex); 103 | } 104 | }); 105 | 106 | setColor(value); 107 | } 108 | 109 | if (!editor.settings.color_picker_callback) { 110 | editor.settings.color_picker_callback = colorPickerCallback; 111 | } 112 | }); -------------------------------------------------------------------------------- /devassets/tinymce/plugins/colorpicker/plugin.min.js: -------------------------------------------------------------------------------- 1 | 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)}); -------------------------------------------------------------------------------- /devassets/tinymce/plugins/contextmenu/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * plugin.js 3 | * 4 | * Released under LGPL License. 5 | * Copyright (c) 1999-2015 Ephox Corp. All rights reserved 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /*global tinymce:true */ 12 | 13 | tinymce.PluginManager.add('contextmenu', function(editor) { 14 | var menu, contextmenuNeverUseNative = editor.settings.contextmenu_never_use_native; 15 | 16 | editor.on('contextmenu', function(e) { 17 | var contextmenu, doc = editor.getDoc(); 18 | 19 | // Block TinyMCE menu on ctrlKey 20 | if (e.ctrlKey && !contextmenuNeverUseNative) { 21 | return; 22 | } 23 | 24 | e.preventDefault(); 25 | 26 | /** 27 | * WebKit/Blink on Mac has the odd behavior of selecting the target word or line this causes 28 | * issues when for example inserting images see: #7022 29 | */ 30 | if (tinymce.Env.mac && tinymce.Env.webkit) { 31 | if (e.button == 2 && doc.caretRangeFromPoint) { 32 | editor.selection.setRng(doc.caretRangeFromPoint(e.x, e.y)); 33 | } 34 | } 35 | 36 | contextmenu = editor.settings.contextmenu || 'link image inserttable | cell row column deletetable'; 37 | 38 | // Render menu 39 | if (!menu) { 40 | var items = []; 41 | 42 | tinymce.each(contextmenu.split(/[ ,]/), function(name) { 43 | var item = editor.menuItems[name]; 44 | 45 | if (name == '|') { 46 | item = {text: name}; 47 | } 48 | 49 | if (item) { 50 | item.shortcut = ''; // Hide shortcuts 51 | items.push(item); 52 | } 53 | }); 54 | 55 | for (var i = 0; i < items.length; i++) { 56 | if (items[i].text == '|') { 57 | if (i === 0 || i == items.length - 1) { 58 | items.splice(i, 1); 59 | } 60 | } 61 | } 62 | 63 | menu = new tinymce.ui.Menu({ 64 | items: items, 65 | context: 'contextmenu', 66 | classes: 'contextmenu' 67 | }).renderTo(); 68 | 69 | editor.on('remove', function() { 70 | menu.remove(); 71 | menu = null; 72 | }); 73 | } else { 74 | menu.show(); 75 | } 76 | 77 | // Position menu 78 | var pos = {x: e.pageX, y: e.pageY}; 79 | 80 | if (!editor.inline) { 81 | pos = tinymce.DOM.getPos(editor.getContentAreaContainer()); 82 | pos.x += e.clientX; 83 | pos.y += e.clientY; 84 | } 85 | 86 | menu.moveTo(pos.x, pos.y); 87 | }); 88 | }); -------------------------------------------------------------------------------- /devassets/tinymce/plugins/contextmenu/plugin.min.js: -------------------------------------------------------------------------------- 1 | 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",e=0;h>e;e++){var j=f*h+e;if(j "}d+=" '+(k?String.fromCharCode(parseInt(k[0],10)):" ")+""}else d+=""}d+=" '; 28 | 29 | tinymce.each(row, function(icon) { 30 | var emoticonUrl = url + '/img/smiley-' + icon + '.gif'; 31 | 32 | emoticonsHtml += ' '; 35 | }); 36 | 37 | emoticonsHtml += ''; 38 | }); 39 | 40 | emoticonsHtml += ''; 41 | 42 | return emoticonsHtml; 43 | } 44 | 45 | editor.addButton('emoticons', { 46 | type: 'panelbutton', 47 | panel: { 48 | role: 'application', 49 | autohide: true, 50 | html: getHtml, 51 | onclick: function(e) { 52 | var linkElm = editor.dom.getParent(e.target, 'a'); 53 | 54 | if (linkElm) { 55 | editor.insertContent( 56 | ' ' 57 | ); 58 | 59 | this.hide(); 60 | } 61 | } 62 | }, 63 | tooltip: 'Emoticons' 64 | }); 65 | }); 66 | -------------------------------------------------------------------------------- /devassets/tinymce/plugins/emoticons/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("emoticons",function(a,b){function c(){var a;return a='
',tinymce.each(d,function(c){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('",tinymce.each(c,function(c){var d=b+"/img/smiley-"+c+".gif";a+=' "}),a+="'}),a+=" '),this.hide())}},tooltip:"Emoticons"})}); -------------------------------------------------------------------------------- /devassets/tinymce/plugins/fullpage/plugin.min.js: -------------------------------------------------------------------------------- 1 | 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