You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Firsly thank you for this awesome module, great job.
I have a small probleme using it, initial content is set after summernote and page init.
(Page loaded ( with summernote init) then i put my content.)
My problem is : how to prevent undo action if history length is 1.
I found it in code but I will be happy to set it in option like that I dont lose changes on module update.
Instead of : /** * undo */ History.prototype.undo = function () { // Create snap shot if not yet recorded if (this.$editable.html() !== this.stack[this.stackOffset].contents) { this.recordUndo(); } if (this.stackOffset > 0) { this.stackOffset--; this.applySnapshot(this.stack[this.stackOffset]); } };
/** * undo */ History.prototype.undo = function () { // Create snap shot if not yet recorded if (this.$editable.html() !== this.stack[this.stackOffset].contents) { this.recordUndo(); } if (this.stackOffset > 1) { this.stackOffset--; this.applySnapshot(this.stack[this.stackOffset]); } };
Is there a function to set that without code update?
thank you
The text was updated successfully, but these errors were encountered:
Hi,
Firsly thank you for this awesome module, great job.
I have a small probleme using it, initial content is set after summernote and page init.
(Page loaded ( with summernote init) then i put my content.)
My problem is : how to prevent undo action if history length is 1.
I found it in code but I will be happy to set it in option like that I dont lose changes on module update.
Instead of :
/** * undo */ History.prototype.undo = function () { // Create snap shot if not yet recorded if (this.$editable.html() !== this.stack[this.stackOffset].contents) { this.recordUndo(); } if (this.stackOffset > 0) { this.stackOffset--; this.applySnapshot(this.stack[this.stackOffset]); } };
/** * undo */ History.prototype.undo = function () { // Create snap shot if not yet recorded if (this.$editable.html() !== this.stack[this.stackOffset].contents) { this.recordUndo(); } if (this.stackOffset > 1) { this.stackOffset--; this.applySnapshot(this.stack[this.stackOffset]); } };
Is there a function to set that without code update?
thank you
The text was updated successfully, but these errors were encountered: