Skip to content
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

Use own schema #96

Open
aried3r opened this issue Jan 23, 2020 · 2 comments
Open

Use own schema #96

aried3r opened this issue Jan 23, 2020 · 2 comments

Comments

@aried3r
Copy link

aried3r commented Jan 23, 2020

Hey! Me again :)

From what I've gathered from the code and from #91 it's currently not possible to load a different schema. My use case is that I want to retain a bit of interoperability between different ProseMirror editors (until we settle and migrate to one) and would like to use the original schema.

From what I've seen I think the only difference is that nib uses camelCase instead of snake_case (e.g. bulletList instead of bullet_list). I don't mind, but is there any particular reason behind it? (Just curious, doesn't matter for the issue)

@jpuri
Copy link
Member

jpuri commented Jan 23, 2020

Hey @aried3r , no specific reason actually, just it comes from prosemirror's example schema. I see in ur case it would make interop hard.

I plan to soon add pluggability to editor, but current plugins will still work for schema they are made to work with.

@aried3r
Copy link
Author

aried3r commented Jan 23, 2020

I believe the prosemirror-schema-list uses snake_case, while nib-edit explictely overwrite this:

https://github.com/nib-edit/Nib/blob/8cc08f1b9e41c8bec5b6e170f9fc05ec60dee4f1/packages/schema/src/nodes/bulletList.js

Again, no harm done, since it's your editor and all. Was just wondering :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants