Class: SpreadsheetEditorHistoryManager

Core.SpreadsheetEditor. SpreadsheetEditorHistoryManager

class for managing history actions in the spreadsheet editor. An instance of this class can be retrieved by SpreadsheetEditorManager.getSpreadsheetEditorHistoryManager.

new SpreadsheetEditorHistoryManager()

Methods


canRedo()

Checks if there are actions to redo.
Returns:
- Returns true if there are actions to redo, false otherwise.
Type
boolean
Example
WebViewer.Iframe(...)
 .then(instance => {
   const { documentViewer, SpreadsheetEditor } = instance.Core;
   const spreadsheetEditorManager = documentViewer.getSpreadsheetEditorManager();
   const spreadsheetEditorHistoryManager = spreadsheetEditorManager.getSpreadsheetEditorHistoryManager();
   spreadsheetEditorHistoryManager.canRedo(); // should print true or false
 });

canUndo()

Checks if there are actions to undo.
Returns:
- Returns true if there are actions to undo, false otherwise.
Type
boolean
Example
WebViewer.Iframe(...)
 .then(instance => {
   const { documentViewer, SpreadsheetEditor } = instance.Core;
   const spreadsheetEditorManager = documentViewer.getSpreadsheetEditorManager();
   const spreadsheetEditorHistoryManager = spreadsheetEditorManager.getSpreadsheetEditorHistoryManager();
   spreadsheetEditorHistoryManager.canUndo(); // should print true or false
 });

redo()

Redoes the last undone action in the spreadsheet editor.
Returns:
Type
void
Example
WebViewer.Iframe(...)
 .then(instance => {
   const { documentViewer, SpreadsheetEditor } = instance.Core;
   const spreadsheetEditorManager = documentViewer.getSpreadsheetEditorManager();
   const spreadsheetEditorHistoryManager = spreadsheetEditorManager.getSpreadsheetEditorHistoryManager();
   spreadsheetEditorHistoryManager.redo();
 });

undo()

Undoes the last action in the spreadsheet editor.
Returns:
Type
void
Example
WebViewer.Iframe(...)
 .then(instance => {
   const { documentViewer, SpreadsheetEditor } = instance.Core;
   const spreadsheetEditorManager = documentViewer.getSpreadsheetEditorManager();
   const spreadsheetEditorHistoryManager = spreadsheetEditorManager.getSpreadsheetEditorHistoryManager();
   spreadsheetEditorHistoryManager.undo();
 });