Skip to content

Commit

Permalink
fix: add awareness object
Browse files Browse the repository at this point in the history
  • Loading branch information
mpreziuso committed Jun 17, 2023
1 parent 7e02428 commit 7f151d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
name,
color,
document.activeElement === editor.getRootElement(),
awareness,
);
const onProviderDocReload = (ydoc: Doc) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,21 @@
export let color: string;
onMount(() => {
const {awareness} = provider;
return mergeRegister(
editor.registerCommand(
FOCUS_COMMAND,
() => {
setLocalStateFocus(provider, name, color, true);
setLocalStateFocus(provider, name, color, true, awareness);
return false;
},
COMMAND_PRIORITY_EDITOR,
),
editor.registerCommand(
BLUR_COMMAND,
() => {
setLocalStateFocus(provider, name, color, false);
setLocalStateFocus(provider, name, color, false, awareness);
return false;
},
COMMAND_PRIORITY_EDITOR,
Expand Down

0 comments on commit 7f151d3

Please sign in to comment.