TinyMCE autosave plugin to restore brower localstorage content.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 10:43 AM
I am trying to configure the autosave plugin on the Portal Widget CSM standard ticket conversation by changing the spTiny ootb angular provider dependency.
On the spTiny code many settings that define the tinyMCE editor are already described and based on the tinyMCE documentation I added the autosave plugin and the restoredraft icon on the toolbar.
Additionally I defined this settings:
autosave_interval: '5s',
autosave_ask_before_unload: true,
autosave_restore_when_empty: true
I can see the browser is saving the content on a localstorage vars of the browser (dev tools>tab application>left dropdown local storage)
Several entries are there and when the button restoredraft becomes clickable after 5s of writing I can revert to the previous version.
The issue is when I load the form with unsaved content.
I was expecting a pop up asking to restore the old content but nothing shows up although the localstorage vars still contain data from the previous load.
I feel this is almost working but something is blocking this popups.