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

Editable code blocks with live preview #197

Open
DanielFGray opened this issue Jun 12, 2022 · 2 comments
Open

Editable code blocks with live preview #197

DanielFGray opened this issue Jun 12, 2022 · 2 comments

Comments

@DanielFGray
Copy link

I accomplished this with @codesandbox/sandpack but it would be great to have codehike's beautiful code blocks instead of a different highlighting/rendering engine

I wonder if this could be accomplished by layering a transparent textarea over the top of the code block? And then sending the new code to sandpack renderer, or react-runner, react-live, whatever works

Just to kick around an idea onto your back burner

@pomber
Copy link
Contributor

pomber commented Jun 14, 2022

Using code hike to re-render the edited code would be hard, right now code hike does all the syntax highlighting on the server when the MDX is transformed to JSX.

So, right now this is out of scope, but maybe we could add something like this in the future.

@texastoland
Copy link

texastoland commented Jun 29, 2023

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

3 participants