Skip to content

Commit

Permalink
fix: playground events usage
Browse files Browse the repository at this point in the history
  • Loading branch information
sanshuiyijing committed Oct 10, 2024
1 parent faec95f commit 75e88ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/playground/src/examples/editor-example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,12 @@ export function EditorExample({
}
}),
events: [
onDocChange((_view, content) => {
onDocChange((_view, _state, content) => {
const s = `Doc changes, current doc:\n\n${content}`
console.log(s)
setOutput(s)
}),
onSelectionChange((view, sels) => {
onSelectionChange((view, _state, sels) => {
if (sels.length === 0 || sels[0].from === sels[0].to) {
return
}
Expand Down

0 comments on commit 75e88ff

Please sign in to comment.