From 48e497b2b009e5b9d2137e2df8dab1639af1bb30 Mon Sep 17 00:00:00 2001 From: Bret McMillan Date: Mon, 10 Nov 2008 16:45:56 -0500 Subject: initial tinymce support for mediawiki --- .../tiny_mce/plugins/template/js/template.js | 106 +++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 extensions/tinymce/jscripts/tiny_mce/plugins/template/js/template.js (limited to 'extensions/tinymce/jscripts/tiny_mce/plugins/template/js') diff --git a/extensions/tinymce/jscripts/tiny_mce/plugins/template/js/template.js b/extensions/tinymce/jscripts/tiny_mce/plugins/template/js/template.js new file mode 100644 index 0000000..24045d7 --- /dev/null +++ b/extensions/tinymce/jscripts/tiny_mce/plugins/template/js/template.js @@ -0,0 +1,106 @@ +tinyMCEPopup.requireLangPack(); + +var TemplateDialog = { + preInit : function() { + var url = tinyMCEPopup.getParam("template_external_list_url"); + + if (url != null) + document.write(''); + }, + + init : function() { + var ed = tinyMCEPopup.editor, tsrc, sel, x, u; + + tsrc = ed.getParam("template_templates", false); + sel = document.getElementById('tpath'); + + // Setup external template list + if (!tsrc && typeof(tinyMCETemplateList) != 'undefined') { + for (x=0, tsrc = []; x'); + }); + }, + + selectTemplate : function(u, ti) { + var d = window.frames['templatesrc'].document, x, tsrc = this.tsrc; + + if (!u) + return; + + d.body.innerHTML = this.templateHTML = this.getFileContents(u); + + for (x=0; x