Skip to content

Instantly share code, notes, and snippets.

@sruli
Created April 10, 2019 10:22
Show Gist options
  • Save sruli/8ad9d7326d2ac8ed37115545fa10c759 to your computer and use it in GitHub Desktop.
Save sruli/8ad9d7326d2ac8ed37115545fa10c759 to your computer and use it in GitHub Desktop.
const stateNoUndo = EditorState.set(state, { allowUndo: false });
const newState = EditorState.push(stateNoUndo, combinedContentState, 'insert-fragment');
const stateAllowUndo = EditorState.set(newState, { allowUndo: true });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment