Skip to content

A Load/Save Plugin for TinyMCE, using the browser's LocalStorage as a filesystem

Notifications You must be signed in to change notification settings

lurchmath/loadsave-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/[email protected]/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

About

A Load/Save Plugin for TinyMCE, using the browser's LocalStorage as a filesystem

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published