From d844ca161fc533ed01827f8afe1f63e4d7bd276c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ju=CC=88rgen=20Hasch?= Date: Fri, 17 Feb 2017 21:21:20 +0100 Subject: [PATCH] Add some documentation --- .../nbextensions/freeze/readme.md | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/jupyter_contrib_nbextensions/nbextensions/freeze/readme.md b/src/jupyter_contrib_nbextensions/nbextensions/freeze/readme.md index d2871ec66..498ca20bb 100644 --- a/src/jupyter_contrib_nbextensions/nbextensions/freeze/readme.md +++ b/src/jupyter_contrib_nbextensions/nbextensions/freeze/readme.md @@ -1,13 +1,24 @@ # Freeze -This extension allows to make cells read-only or frozen. +This extension allows to make cells read-only or frozen. It provides three buttons: +* unlock +* read-only +* frozen -If a code cell is read-only, it can be executed, but its input cannot be changed. -Frozen code cells cannot be either altered or executed. -If a markdown cell is read-only, its input can be viewed by double-clicking on it, but cannot be changed. -Frozen markdown cells' input cannot be viewed by double-clicking. +For **code-cells**:
+_read-only_: it can be executed, but its input cannot be changed.
+_frozen_: It cannot be either altered or executed. -To change cells' state, select them and press corresponding button. +For **markdown-cells**:
+_read-only_: It's input can be viewed by double-clicking on it, but cannot be changed.
+_frozen_: Input cannot be viewed by double-clicking. -Cell's state is stored in its metadata and is applied to the cell if the extension is loaded. +To change the state of a selected cell, press the corresponding button. + +The individual cell's state is stored in its metadata and is applied to the cell if the extension is loaded. + +##Internals + +The _read-only_ state is stored in the `cell.metadata.run_control.read_only` attribute. +The _frozen_ state is stored in the `cell.metadata.run_control.frozen`attribute.