Skip to content

Commit

Permalink
GH-3257: add hash to autosave prefix to make it work better with SPA …
Browse files Browse the repository at this point in the history
…using hash routes
  • Loading branch information
Mattias Wikstrom committed Oct 13, 2017
1 parent 9b52f49 commit 0084d5c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/autosave/src/main/js/api/Settings.js
Expand Up @@ -20,10 +20,11 @@ define(
};

var getAutoSavePrefix = function (editor) {
var prefix = editor.getParam('autosave_prefix', 'tinymce-autosave-{path}{query}-{id}-');
var prefix = editor.getParam('autosave_prefix', 'tinymce-autosave-{path}{query}{hash}-{id}-');

prefix = prefix.replace(/\{path\}/g, document.location.pathname);
prefix = prefix.replace(/\{query\}/g, document.location.search);
prefix = prefix.replace(/\{hash\}/g, document.location.hash);
prefix = prefix.replace(/\{id\}/g, editor.id);

return prefix;
Expand Down

0 comments on commit 0084d5c

Please sign in to comment.