loadsave-plugin

Load/Save Plugin for TinyMCE

This plugin will leverage jsfs to add load and save functionality to a TinyMCE instance. It assumes that both TinyMCE and jsfs have been loaded into the global namespace, so that it can access both.

Usage

To use this module in your page, you must:

  1. Include in your page an instance of the TinyMCE editor. You can do so with a script tag like this one:
<script src="https://cloud.tinymce.com/stable/tinymce.min.js"></script>
  1. Import the modules on which this one depends, including LZString for compression and jsfs for an in-browser filesystem. Like so:
<script language='javascript' src='https://cdn.jsdelivr.net/npm/lz-string@1.4.4/libs/lz-string.min.js'></script>
<script src="https://cdn.jsdelivr.net/gh/nathancarter/jsfs@1/release/jsfs.min.js"></script>
  1. Copy into your page’s folder all the files in the example folder of this repository, with the exception of example.html.
  2. In your call to tinymce.init, be sure to include these options.
    • plugins: "-loadsave"
    • On the File menu, the items newfile, openfile, savefile, saveas, and managefiles

Example

To see all this in action, check out the example page.

License

LGPLv3