1 /* Import plugin specific language pack */
\r
2 tinyMCE.importPluginLanguagePack('save', 'en,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,he,no,hu');
\r
4 function TinyMCE_save_getInfo() {
\r
7 author : 'Moxiecode Systems',
\r
8 authorurl : 'http://tinymce.moxiecode.com',
\r
9 infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_save.html',
\r
10 version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
\r
15 * Returns the HTML contents of the save control.
\r
17 function TinyMCE_save_getControlHTML(control_name) {
\r
18 switch (control_name) {
\r
20 return '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSave\');" target="_self" onmousedown="return false;"><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\');" /></a>';
\r
27 * Executes the save command.
\r
29 function TinyMCE_save_execCommand(editor_id, element, command, user_interface, value) {
\r
33 var formObj = tinyMCE.selectedInstance.formElement.form;
\r
36 tinyMCE.triggerSave();
\r
38 // Disable all UI form elements that TinyMCE created
\r
39 for (var i=0; i<formObj.elements.length; i++) {
\r
40 var elementId = formObj.elements[i].name ? formObj.elements[i].name : formObj.elements[i].id;
\r
42 if (elementId.indexOf('mce_editor_') == 0)
\r
43 formObj.elements[i].disabled = true;
\r
46 tinyMCE.isNotDirty = true;
\r
47 tinyMCE.selectedInstance.formElement.form.submit();
\r
49 alert("Error: No form element found.");
\r
53 // Pass to next handler in chain
\r