upgrade tinymce to 1.40

This commit is contained in:
JT Smith 2005-01-30 23:32:49 +00:00
parent 7ceff84e8a
commit 7d9c0268ac
107 changed files with 3717 additions and 492 deletions

View file

@ -0,0 +1,43 @@
/* Import theme specific language pack */
tinyMCE.importPluginLanguagePack('save', 'uk');
/**
* Returns the HTML contents of the save control.
*/
function TinyMCE_save_getControlHTML(control_name) {
switch (control_name) {
case "save":
return '<img id="{$editor_id}_save" src="{$pluginurl}/images/save.gif" title="{$lang_save_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.switchClass(this,\'mceButtonNormal\');" onmousedown="tinyMCE.switchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSave\');" />';
}
return "";
}
/**
* Executes the save command.
*/
function TinyMCE_save_execCommand(editor_id, element, command, user_interface, value) {
// Handle commands
switch (command) {
case "mceSave":
var formObj = tinyMCE.selectedInstance.formElement.form;
if (formObj) {
tinyMCE.triggerSave();
// Disable all UI form elements that TinyMCE created
for (var i=0; i<formObj.elements.length; i++) {
var elementId = formObj.elements[i].name ? formObj.elements[i].name : formObj.elements[i].id;
if (elementId.indexOf('mce_editor_') == 0)
formObj.elements[i].disabled = true;
}
tinyMCE.selectedInstance.formElement.form.submit();
} else
alert("Error: No form element found.");
return true;
}
// Pass to next handler in chain
return false;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 B

View file

@ -0,0 +1,3 @@
// UK lang variables
tinyMCELang['lang_save_desc'] = 'Save';

View file

@ -0,0 +1,19 @@
Save plugin for TinyMCE
(Dec 2004) by SlyD - d.herwald@dsh-elektronik.de
--------------------------
About:
Adds a "save" button that submits the form.
Installation instructions:
* Copy the save directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins).
* Add plugin to TinyMCE plugin option list example: plugins : "save".
* Add the save button name to button list, example: theme_advanced_buttons3_add : "save".
Initialization example:
tinyMCE.init({
theme : "advanced",
mode : "textareas",
plugins : "save",
theme_advanced_buttons3_add : "save"
});