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
feat(codeeditor): support to extensions #286
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit b4cfdf3:
|
82082ff
to
3820c71
Compare
3820c71
to
55ce1db
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Property to register Codemirror extension keymap. | ||
*/ | ||
extensionsKeymap?: Array<readonly KeyBinding[]>; | ||
id?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓What's the id
for? Should we add a comment explaining what it's for? I'm assuming it maps to the id
of the CodeEditor
so maybe that's obvious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. This is a temp bug fix that I'll approach in another PR soon. It's related to a random id generated in every render, which leads to unmatch values in tests cases. Here's more detail #143
@@ -153,6 +153,31 @@ If you played with the `Sandpack` preset, you should be familiar already with th | |||
</SandpackLayout> | |||
</SandpackProvider> | |||
|
|||
### Extensions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! I was hoping you'd add docs too 🙌
Co-authored-by: Sanne <sanne@codesandbox.io>
Any ideas on when this will be merged? |
Introduces the ability to load Codemirror extensions in the CodeEditor component, in two ways:
Closes #280