diff --git a/www/extras/tinymce/images/Thumbs.db b/www/extras/tinymce/images/Thumbs.db
deleted file mode 100644
index 1599a024f..000000000
Binary files a/www/extras/tinymce/images/Thumbs.db and /dev/null differ
diff --git a/www/extras/tinymce/images/bmp.gif b/www/extras/tinymce/images/bmp.gif
deleted file mode 100644
index fb1a05948..000000000
Binary files a/www/extras/tinymce/images/bmp.gif and /dev/null differ
diff --git a/www/extras/tinymce/images/closed.gif b/www/extras/tinymce/images/closed.gif
deleted file mode 100644
index 2d134649d..000000000
Binary files a/www/extras/tinymce/images/closed.gif and /dev/null differ
diff --git a/www/extras/tinymce/images/dpi.gif b/www/extras/tinymce/images/dpi.gif
deleted file mode 100644
index e7e7b2504..000000000
Binary files a/www/extras/tinymce/images/dpi.gif and /dev/null differ
diff --git a/www/extras/tinymce/images/ed_delete.gif b/www/extras/tinymce/images/ed_delete.gif
deleted file mode 100644
index 121834938..000000000
Binary files a/www/extras/tinymce/images/ed_delete.gif and /dev/null differ
diff --git a/www/extras/tinymce/images/gif.gif b/www/extras/tinymce/images/gif.gif
deleted file mode 100644
index fb1a05948..000000000
Binary files a/www/extras/tinymce/images/gif.gif and /dev/null differ
diff --git a/www/extras/tinymce/images/icon.gif b/www/extras/tinymce/images/icon.gif
deleted file mode 100644
index cfba15aef..000000000
Binary files a/www/extras/tinymce/images/icon.gif and /dev/null differ
diff --git a/www/extras/tinymce/images/indent.gif b/www/extras/tinymce/images/indent.gif
deleted file mode 100644
index 8038c648d..000000000
Binary files a/www/extras/tinymce/images/indent.gif and /dev/null differ
diff --git a/www/extras/tinymce/images/jpg.gif b/www/extras/tinymce/images/jpg.gif
deleted file mode 100644
index a31e93b88..000000000
Binary files a/www/extras/tinymce/images/jpg.gif and /dev/null differ
diff --git a/www/extras/tinymce/images/opened.gif b/www/extras/tinymce/images/opened.gif
deleted file mode 100644
index 5e492b95a..000000000
Binary files a/www/extras/tinymce/images/opened.gif and /dev/null differ
diff --git a/www/extras/tinymce/images/png.gif b/www/extras/tinymce/images/png.gif
deleted file mode 100644
index fb1a05948..000000000
Binary files a/www/extras/tinymce/images/png.gif and /dev/null differ
diff --git a/www/extras/tinymce/images/wmf.gif b/www/extras/tinymce/images/wmf.gif
deleted file mode 100644
index fb1a05948..000000000
Binary files a/www/extras/tinymce/images/wmf.gif and /dev/null differ
diff --git a/www/extras/tinymce/jscripts/tiny_mce/plugins/contextmenu/readme.txt b/www/extras/tinymce/jscripts/tiny_mce/plugins/contextmenu/readme.txt
new file mode 100644
index 000000000..4fdb78aec
--- /dev/null
+++ b/www/extras/tinymce/jscripts/tiny_mce/plugins/contextmenu/readme.txt
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.
diff --git a/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/editor_plugin.js b/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/editor_plugin.js
new file mode 100644
index 000000000..0e243a3f7
--- /dev/null
+++ b/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/editor_plugin.js
@@ -0,0 +1,2 @@
+/* Import plugin specific language pack */
+ tinyMCE.importPluginLanguagePack('directionality','en,sv,fr_ca,zh_cn');function TinyMCE_directionality_getControlHTML(control_name){var safariPatch='" onclick="';if(tinyMCE.isSafari)safariPatch="";switch(control_name){case "ltr":return '
';case "rtl":return '
';}return "";}function TinyMCE_directionality_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceDirectionLTR":var inst=tinyMCE.getInstanceById(editor_id);var elm=tinyMCE.getParentElement(inst.getFocusElement(),"p,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(elm)elm.setAttribute("dir","ltr");tinyMCE.triggerNodeChange(false);return true;case "mceDirectionRTL":var inst=tinyMCE.getInstanceById(editor_id);var elm=tinyMCE.getParentElement(inst.getFocusElement(),"p,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(elm)elm.setAttribute("dir","rtl");tinyMCE.triggerNodeChange(false);return true;}return false;}function TinyMCE_directionality_handleNodeChange(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):"";}tinyMCE.switchClassSticky(editor_id+'_ltr','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_rtl','mceButtonNormal');if(node==null)return;var elm=tinyMCE.getParentElement(node,"p,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(!elm)return;var dir=getAttrib(elm,"dir");if(dir=="ltr"||dir=="")tinyMCE.switchClassSticky(editor_id+'_ltr','mceButtonSelected');else tinyMCE.switchClassSticky(editor_id+'_rtl','mceButtonSelected');return true;}
\ No newline at end of file
diff --git a/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/editor_plugin_src.js b/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/editor_plugin_src.js
new file mode 100644
index 000000000..2edb660a8
--- /dev/null
+++ b/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/editor_plugin_src.js
@@ -0,0 +1,71 @@
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('directionality', 'en,sv,fr_ca,zh_cn');
+
+function TinyMCE_directionality_getControlHTML(control_name) {
+ var safariPatch = '" onclick="';
+
+ if (tinyMCE.isSafari)
+ safariPatch = "";
+
+ switch (control_name) {
+ case "ltr":
+ return '
';
+
+ case "rtl":
+ return '
';
+ }
+
+ return "";
+}
+
+function TinyMCE_directionality_execCommand(editor_id, element, command, user_interface, value) {
+ // Handle commands
+ switch (command) {
+ case "mceDirectionLTR":
+ var inst = tinyMCE.getInstanceById(editor_id);
+ var elm = tinyMCE.getParentElement(inst.getFocusElement(), "p,div,td,h1,h2,h3,h4,h5,h6,pre,address");
+
+ if (elm)
+ elm.setAttribute("dir", "ltr");
+
+ tinyMCE.triggerNodeChange(false);
+ return true;
+
+ case "mceDirectionRTL":
+ var inst = tinyMCE.getInstanceById(editor_id);
+ var elm = tinyMCE.getParentElement(inst.getFocusElement(), "p,div,td,h1,h2,h3,h4,h5,h6,pre,address");
+
+ if (elm)
+ elm.setAttribute("dir", "rtl");
+
+ tinyMCE.triggerNodeChange(false);
+ return true;
+ }
+
+ // Pass to next handler in chain
+ return false;
+}
+
+function TinyMCE_directionality_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
+ function getAttrib(elm, name) {
+ return elm.getAttribute(name) ? elm.getAttribute(name) : "";
+ }
+
+ tinyMCE.switchClassSticky(editor_id + '_ltr', 'mceButtonNormal');
+ tinyMCE.switchClassSticky(editor_id + '_rtl', 'mceButtonNormal');
+
+ if (node == null)
+ return;
+
+ var elm = tinyMCE.getParentElement(node, "p,div,td,h1,h2,h3,h4,h5,h6,pre,address");
+ if (!elm)
+ return;
+
+ var dir = getAttrib(elm, "dir");
+ if (dir == "ltr" || dir == "")
+ tinyMCE.switchClassSticky(editor_id + '_ltr', 'mceButtonSelected');
+ else
+ tinyMCE.switchClassSticky(editor_id + '_rtl', 'mceButtonSelected');
+
+ return true;
+}
diff --git a/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/images/ltr.gif b/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/images/ltr.gif
new file mode 100644
index 000000000..1f8e046b7
Binary files /dev/null and b/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/images/ltr.gif differ
diff --git a/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/images/rtl.gif b/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/images/rtl.gif
new file mode 100644
index 000000000..40ec61303
Binary files /dev/null and b/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/images/rtl.gif differ
diff --git a/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/langs/en.js b/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/langs/en.js
new file mode 100644
index 000000000..2f5ad455f
--- /dev/null
+++ b/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/langs/en.js
@@ -0,0 +1,4 @@
+// UK lang variables
+
+tinyMCELang['lang_directionality_ltr_desc'] = 'Direction left to right'
+tinyMCELang['lang_directionality_rtl_desc'] = 'Direction right to left';
diff --git a/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/langs/fr_ca.js b/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/langs/fr_ca.js
new file mode 100644
index 000000000..41b62a072
--- /dev/null
+++ b/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/langs/fr_ca.js
@@ -0,0 +1,4 @@
+// fr_ca lang variables
+
+tinyMCELang['lang_directionality_ltr_desc'] = 'Direction de la gauche vers la droite'
+tinyMCELang['lang_directionality_rtl_desc'] = 'Direction de la droite vers la gauche';
diff --git a/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/langs/sv.js b/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/langs/sv.js
new file mode 100644
index 000000000..7639836ce
--- /dev/null
+++ b/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/langs/sv.js
@@ -0,0 +1,4 @@
+// SV lang variables
+
+tinyMCELang['lang_directionality_ltr_desc'] = 'Riktning från vänster till höger'
+tinyMCELang['lang_directionality_rtl_desc'] = 'Riktning från höger till vänster';
diff --git a/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/langs/zh_cn.js b/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/langs/zh_cn.js
new file mode 100644
index 000000000..9dfe94aaa
--- /dev/null
+++ b/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/langs/zh_cn.js
@@ -0,0 +1,5 @@
+// Simplified Chinese lang variables contributed by cube316 (cube316@gmail.com)
+//Çë·ÃÎÊ http://www.cube316.net/ ÒÔ»ñÈ¡TinyMCEµÄÖÐÎÄÖ§³Ö
+
+tinyMCELang['lang_directionality_ltr_desc'] = '´Ó×óÍùÓҵķ½Ïò'
+tinyMCELang['lang_directionality_rtl_desc'] = '´ÓÓÒÍù×óµÄ·½Ïò';
diff --git a/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/readme.txt b/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/readme.txt
new file mode 100644
index 000000000..4fdb78aec
--- /dev/null
+++ b/www/extras/tinymce/jscripts/tiny_mce/plugins/directionality/readme.txt
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.
diff --git a/www/extras/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js b/www/extras/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js
new file mode 100644
index 000000000..52a91b97e
--- /dev/null
+++ b/www/extras/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js
@@ -0,0 +1,2 @@
+/* Import plugin specific language pack */
+ tinyMCE.importPluginLanguagePack('fullscreen','en,sv,cs,fr_ca,zh_cn');function TinyMCE_fullscreen_getControlHTML(control_name){switch(control_name){case "fullscreen":return '
';}return "";}function TinyMCE_fullscreen_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceFullScreen":if(tinyMCE.getParam('fullscreen_is_enabled')){window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'),'mceSetContent',false,tinyMCE.getContent(editor_id));top.close();}else{tinyMCE.setWindowArg('editor_id',editor_id);var win=window.open(tinyMCE.baseURL+"/plugins/fullscreen/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);}return true;}return false;}
\ No newline at end of file
diff --git a/www/extras/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js b/www/extras/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js
new file mode 100644
index 000000000..2cf595dd6
--- /dev/null
+++ b/www/extras/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js
@@ -0,0 +1,34 @@
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('fullscreen', 'en,sv,cs,fr_ca,zh_cn');
+
+function TinyMCE_fullscreen_getControlHTML(control_name) {
+ switch (control_name) {
+ case "fullscreen":
+ return '
';
+ }
+
+ return "";
+}
+
+function TinyMCE_fullscreen_execCommand(editor_id, element, command, user_interface, value) {
+ // Handle commands
+ switch (command) {
+ case "mceFullScreen":
+ if (tinyMCE.getParam('fullscreen_is_enabled')) {
+ // In fullscreen mode
+ window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'), 'mceSetContent', false, tinyMCE.getContent(editor_id));
+ top.close();
+ } else {
+ tinyMCE.setWindowArg('editor_id', editor_id);
+
+ var win = window.open(tinyMCE.baseURL + "/plugins/fullscreen/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight);
+ }
+
+ return true;
+ }
+
+ // Pass to next handler in chain
+ return false;
+}
+
+
diff --git a/www/extras/tinymce/jscripts/tiny_mce/plugins/fullscreen/fullscreen.htm b/www/extras/tinymce/jscripts/tiny_mce/plugins/fullscreen/fullscreen.htm
new file mode 100644
index 000000000..30644e66d
--- /dev/null
+++ b/www/extras/tinymce/jscripts/tiny_mce/plugins/fullscreen/fullscreen.htm
@@ -0,0 +1,72 @@
+
+
","gi");content=tinyMCE.regexpReplace(content,"\r\r","
","gi");content=tinyMCE.regexpReplace(content,"\n\n","
","gi");if((pos=content.indexOf('
'))!=-1){tinyMCE.execCommand("Delete");var node=tinyMCE.selectedInstance.getFocusElement();var breakElms=new Array();do{if(node.nodeType==1){if(node.nodeName=="TD"||node.nodeName=="BODY")break;breakElms[breakElms.length]=node;}}while(node=node.parentNode);var before="",after="
";before+=content.substring(0,pos);for(var i=0;i";content=before+content.substring(pos+7)+after;}}content=tinyMCE.regexpReplace(content,"\r\n","
","gi");content=tinyMCE.regexpReplace(content,"\r","
","gi");content=tinyMCE.regexpReplace(content,"\n","
","gi");}tinyMCE.execCommand("mceInsertRawHTML",false,content);}}function TinyMCE_paste__insertWordContent(content){if(content&&content.length>0){content=content.replace(new RegExp('<(!--)([^>]*)(--)>','g'),"");content=content.replace(/<\/?span[^>]*>/gi,"");content=content.replace(/<(\w[^>]*)style="([^"]*)"([^>]*)/gi, "<$1$3");
+ content = content.replace(/<\/?font[^>]*>/gi, "");
+ content = content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3");
+ content = content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3");
+ content = content.replace(/<\\?\?xml[^>]*>/gi, "");
+ content = content.replace(/<\/?\w+:[^>]*>/gi, "");
+ content = content.replace(/\/? */gi, "");
+ content = content.replace('
', '' ,'g'); + + if (!tinyMCE.settings['force_p_newlines']) { + content = content.replace('', '' ,'gi'); + content = content.replace('', '
", "gi"); + content = tinyMCE.regexpReplace(content, "\r\r", "
", "gi"); + content = tinyMCE.regexpReplace(content, "\n\n", "
", "gi"); + + // Has paragraphs + if ((pos = content.indexOf('
')) != -1) { + tinyMCE.execCommand("Delete"); + + var node = tinyMCE.selectedInstance.getFocusElement(); + + // Get list of elements to break + var breakElms = new Array(); + + do { + if (node.nodeType == 1) { + // Don't break tables and break at body + if (node.nodeName == "TD" || node.nodeName == "BODY") + break; + + breakElms[breakElms.length] = node; + } + } while(node = node.parentNode); + + var before = "", after = "
"; + before += content.substring(0, pos); + + for (var i=0; i";
+ content = before + content.substring(pos+7) + after;
+ }
+ }
+
+ content = tinyMCE.regexpReplace(content, "\r\n", "
", "gi");
+ content = tinyMCE.regexpReplace(content, "\r", "
", "gi");
+ content = tinyMCE.regexpReplace(content, "\n", "
", "gi");
+ }
+
+ tinyMCE.execCommand("mceInsertRawHTML", false, content);
+ }
+}
+
+function TinyMCE_paste__insertWordContent(content) {
+
+ if (content && content.length > 0) {
+ // Cleanup Word content
+ content = content.replace(new RegExp('<(!--)([^>]*)(--)>', 'g'), ""); // Word comments
+ content = content.replace(/<\/?span[^>]*>/gi, "");
+ content = content.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi, "<$1$3");
+ content = content.replace(/<\/?font[^>]*>/gi, "");
+ content = content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3");
+ content = content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3");
+ content = content.replace(/<\\?\?xml[^>]*>/gi, "");
+ content = content.replace(/<\/?\w+:[^>]*>/gi, "");
+ content = content.replace(/\/? */gi, "");
+ content = content.replace('
', '' ,'g'); + + if (!tinyMCE.settings['force_p_newlines']) { + content = content.replace('', '' ,'gi'); + content = content.replace('', '