-
-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent y-websocket initial value from entering slate-history undos #205
Comments
Hi @SamDuvall, Another way you could solve this is by wrapping I haven't actually tested it, but it should work 😄 |
@BitPhinix, thank you. That was an excellent suggestion and worked beautifully. I can't think of a good reason why one would want remote changes to creep into their local history. I wish there was an easy way to add this to
|
Awesome, glad I could help! I haven't yet added this to |
I'm running into an issue where loading the initial value from
y-websocket
is adding an operation into undos fromslate-history
that I don't want. Having that initial value operation ineditor.history
allows the user to click undo and wipe out the document, which is not desirable.I'm creating my editor like
slate-yjs-example
I added a hack to pop off the initial value operation from the history for now:
I'm not sure if a fix belongs in
slate-yjs
or somewhere else, but does anyone have a better approach to usingslate-yjs
in combinations withy-websocket
&slate-history
for the initial value?The text was updated successfully, but these errors were encountered: