-
Notifications
You must be signed in to change notification settings - Fork 52
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
Update rich text docs #99
Conversation
This already is much more reliable! I can see the synchronization from one tab to another, and there are no more issues around the The one remaining issue I see: I can apply changes to a document, and then open the URL in a new tab and I see a blank page. The new editor does nothing to catch up on the change log. From then on, any new synchronization occurs like normal, so the handle is solid. There is simply a missing phase: how to load the document from the I'll explore more once plugged in again. |
huh, do you think this could be an issue in the const { doc, schema, plugin } = init(handle!, ["page"])
window.doc = doc
window.schema = schema
window.plugin = plugin browser console:
|
Meanwhile,
( I use |
Yep! A simple change in name; the guide should change useEffect(() => {
if (editorRoot.current != null && loaded) {
const { pmDoc, schema, plugin } = init(handle!, ["text"])
const plugins = exampleSetup({schema})
plugins.push(plugin)
setView(new EditorView(
editorRoot.current,
{ state: EditorState.create({ schema, plugins, doc: pmDoc, }), }
))
}
return () => { if (view) { view.destroy(); setView(null) } }
}, [editorRoot, loaded]) |
You also have my 👍 to change the return signature to conform to prosemirror, seems sensible in this case. |
A change here means there is no more need for: automerge/automerge.github.io#99 (review)
Also see! |
Co-authored-by: Calliope <[email protected]>
Update the rich text docs to match the simplified plugin API. This is a sketch, I still need to check the example code functions.