How can we edit an existing .ipynb in Jupyter Lab to be read-only? More specifically, how can we make specific cells within an existing .ipynb become read-only?
Basically, other users would be able to edit cells that I allow them to (i.e. a cell that specifies an input data file) but all code in other analysis cells can be run but not edited.
If I can't edit an existing .ipynb file to do this, I don't mind saving a notebook with a different name via "Save as" if that makes things easier.
I received an answer (below the underline) from the issue I opened on the JupyterLab GitHub
Thanks to Alex for the answer.
Original GitHub Issue post is here.
You just need to add
{
"editable": false
}
in your cell Metadata.
If you are using Jupyterlab, you can install the Celltags extension for ease of metadata editing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With