Skip to content

Commit

Permalink
Update notebook dev example docs. (jupyterlab#4938)
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-r-rose authored and blink1073 committed Jul 21, 2018
1 parent 69d116c commit 80d2238
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions docs/source/developer/notebook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,14 @@ individual cell input content is supported by the CodeMirror editor's
undo feature. (Note: CodeMirror editor's undo does not cover cell
metadata changes.)

Cursors and metadata
Metadata
''''''''''''''''''''

The notebook model and the cell model (i.e. notebook cells) support
getting and setting metadata through cursors. You may request a cursor
to write to a specific metadata key from a notebook model or a cell
model.
getting and setting metadata through an
`IObservableJSON <http://jupyterlab.github.io/jupyterlab/modules/_observables_src_observablejson_.iobservablejson.html>`__
object. You can use this to get and set notebook/cell metadata,
as well as subscribe to changes to it.

Notebook widget
^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -209,7 +210,7 @@ Copy the following to ``src/index.ts``:
*/
createNew(panel: NotebookPanel, context: DocumentRegistry.IContext<INotebookModel>): IDisposable {
let callback = () => {
NotebookActions.runAll(panel.notebook, context.session);
NotebookActions.runAll(panel.content, context.session);
};
let button = new ToolbarButton({
className: 'myButton',
Expand Down

0 comments on commit 80d2238

Please sign in to comment.