Skip to content

Latest commit

 

History

History
58 lines (38 loc) · 1.75 KB

File metadata and controls

58 lines (38 loc) · 1.75 KB

Save plugin

This plugin adds a save button to the {productname} toolbar, which will submit the form that the editor is within.

Basic setup

tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  plugins: 'save',
  toolbar: 'save'
});

Save error messages

The "Error: Form submit field collision." error message will appear if you call the submit button of your form "submit", which causes a collision with the JS form submit function and makes it impossible to submit the form using code. This can easily be avoided by naming the submit button "submitbtn" or similar.

So replace this:

<form><button name="submit"></button></form>

With this:

<form><button name="submitbtn"></button></form>

Options

These settings affect the execution of the save plugin. Callbacks that will execute after saving the content or canceling saving the content are included in this section. In addition, a setting that will disable the save button when no modifications have been made to the content is available here.

Commands

The Save plugin provides the following {productname} commands.