1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-26 16:44:22 +02:00

Update search-highlighting example per #1454 (#1526)

This commit is contained in:
Ben Gotow
2018-01-12 10:41:17 -08:00
committed by Ian Storm Taylor
parent 6673e1ec6d
commit 73392b9596

View File

@@ -65,7 +65,14 @@ class SearchHighlighting extends React.Component {
}) })
}) })
const change = value.change().setValue({ decorations }) // setting the `save` option to false prevents this change from being added
// to the undo/redo stack and clearing the redo stack if the user has undone
// changes.
const change = value.change()
.setOperationFlag('save', false)
.setValue({ decorations })
.setOperationFlag('save', true)
this.onChange(change) this.onChange(change)
} }