this.initIcons();
this.markdown();
this.changePage();
- this.undo.initState();
$(window).on('hashchange', function () {
/*if ($this.maskHashEvent) {
window.location.hash = '#' + this.currentPage;
$("#markdowneditor-page-field input").val(this.currentPage);
+
+ this.undo.initState();
+ this.undo.updateIconsStates();
+
+ console.log(this.undo.states)
},
firstPage: function () {
return this._states().undo;
},
-
pushState: function () {
if (this.ignoreStatesChanges) {
console.log('ignore states changes');
let index = this.indexes[this.markdowneditor.getCurrentPage()];
if (index === 0) {
- this.states[this.markdowneditor.getCurrentPage()] = [
- this.markdowneditor.contentMarkdown
- ];
+ this.states[this.markdowneditor.getCurrentPage()] = [];
}
let cs = this.markdowneditor.editor.getMarkdown();