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

Code cell #846

Open
LukasMasuch opened this issue Dec 30, 2023 · 2 comments
Open

Code cell #846

LukasMasuch opened this issue Dec 30, 2023 · 2 comments
Labels
package:cells Requests related to the cells package type:enhancement Requests for enhancements or new features

Comments

@LukasMasuch
Copy link
Collaborator

Add a cell type to the cells package to display and edit code with syntax highlighting. The overlay editor could be based on monaco or codemirror editor. The behavior is pretty comparable to the markdown and article cell types.

interface CodeCellProps {
    readonly kind: "code-cell";
    readonly data: string | undefined | null;
}
@jassmith
Copy link
Contributor

If the package we choose is good enough it might even be possible to get the highlighting into the rendered cell

@LukasMasuch LukasMasuch added the package:cells Requests related to the cells package label Dec 30, 2023
@BrianHung
Copy link
Collaborator

Would add a language prop there to the syntax highlighter would know how to parse it. I'm biased towards recommending CodeMirror, since if you use the same syntax highlighter and language for renderer and editor, it will reduce bundle size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:cells Requests related to the cells package type:enhancement Requests for enhancements or new features
Projects
None yet
Development

No branches or pull requests

3 participants