Skip to main content

Save

Plugin alias: save

editor42.init({
plugins: 'save'
});

Adds save and cancel functionality to the editor. Save either calls a custom callback or submits the parent HTML form. Cancel either calls a custom callback or resets content to the initial state. The save button is disabled when content is not dirty.

Options

OptionTypeDefaultDescription
save_enablewhendirtybooleantrueButtons only enabled when content is modified.
save_onsavecallbackfunctionCustom save callback.
save_oncancelcallbackfunctionCustom cancel callback.

Commands

CommandDescription
editor42SaveTriggers save action.
editor42CancelTriggers cancel action.

Toolbar buttons

ButtonTypeDescription
saveButtonTriggers save action.
cancelButtonTriggers cancel action.

Keyboard shortcuts

ShortcutAction
Ctrl+S / Cmd+STriggers save action.