TinyMCE:Plugins/save

From Moxiecode Documentation Wiki

Jump to: navigation, search

Contents

Plugin: save

This plugin adds a save button to TinyMCE this save button will submit the form that the editor is within.

Installation Instructions

  1. Add plugin to TinyMCE plugin option list example: plugins : "save".
  2. Add the save and cancel button names to button list, example: theme_advanced_buttons3_add : "save,cancel".

Plugin options

[save_enablewhendirty]
If you set this option to true, the edit button will be disabled/dimmed until modifications are made. This is disabled by default.
[save_onsave_callback]
This option enables you to add a custom function to be called when the save button/command is invoked. This is not used by default.
"save_onsave_callback" as shown above is incorrect. The plugin code in version 3.02a uses the configuration option of "save_onsavecallback". So which was meant to be used? --Lifo 16:22, 9 November 2007 (CET)

Initialization Example

tinyMCE.init({
	theme : "advanced",
	mode : "textareas",
	plugins : "save",
	theme_advanced_buttons3_add : "save",
	save_enablewhendirty : true,
	save_onsavecallback : "mysave"
});
Personal tools