-
Notifications
You must be signed in to change notification settings - Fork 366
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
Feature request: Support read-only mode for CodeEditor #296
Comments
If it helps, I am ready to implement it myself. |
Hey @andreifloricel! I would totally encourage you to implement it by yourself, and I would be more than happy to guide you through it. But unfortunately, Sandpack is in the middle of a relicensing process, and we can't accept core contributions for the time being. So, I'll try to spend some time on this, maybe during this week. The
Please, let me know if you have suggestions or requests related to it. |
Hi @danilowoz, I agree with the first 2 items, not sure I understand the 3. one (...Figure out a visual element saying that a file is read-only...).
|
Tell us how you think we can improve Sandpack
In some cases it would be useful to control the editability of the code editor.
As of now (0.12.0), we can use either a CodeEditor or a CodeViewer.
Feature request #97 is somewhat related to this (file-based editability), but this feature is easier to implement because the underlying CodeMirror already supports a "ReadOnly" property.
Packages affected
How would your idea work?
Add a new
readOnly
CodeEditor prop (default:false
) which is then passed to the underlying CodeMirror which already supports this property.When/If #97 is implemened, it would just mean that the editability of every bundled file will default to the current CodeEditor editability.
The text was updated successfully, but these errors were encountered: