Issue #2556Opened February 8, 2020by MatthewMariner4 reactions

[Question] Limit UndoManager to X amount of steps

Question

Use Case: Hey guys, I looked through the UndoManager API/Searched for issues - but I am unable to figure out how to limit the UndoManager. If I create a robust website and spend 30 minutes making it, it looks like I can ctrl + z all the way back to start. I'm thinking this could possibly slow down the Editor since it saves all these steps in the Undo Manager.

TLDR So, does anyone know how to limit the UndoManager to only save X amount of steps?

Answers (2)

artfFebruary 13, 20204 reactions
editor.UndoManager.getInstance().set('maximumStackLength', 100);
MatthewMarinerFebruary 14, 20200 reactions

Thank you @artf

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.