Code cell constructor
Don't use the constructor directly - prefer using YNotebook.insertCell
The ysource
is needed because ymodel.get('source')
will
not return the real source if the model is not yet attached to
a document. Requesting it explicitly allows to introspect a non-empty
source before the cell is attached to the document.
Cell map
Cell source
Code cell outputs
{ notebook?: The notebook the cell is attached to }
Optional
ymetadata: YMap<any>Cell metadata
Protected
_metadataProtected
_notebookThe notebook that this cell belongs to.
Private
_youtputsReadonly
ymodelThe type of the cell.
The changed signal.
The code cell's execution state.
The code cell's execution state.
The code cell's prompt number. Will be null if the cell has not been run.
The code cell's prompt number. Will be null if the cell has not been run.
Cell id
Whether the model has been disposed or not.
Whether the cell is standalone or not.
If the cell is standalone. It cannot be inserted into a YNotebook because the Yjs model is already attached to an anonymous Y.Doc instance.
Signal triggered when the cell metadata changes.
Cell input content.
Text
The cell undo manager.
Shareable text
Protected
getExtract changes from YJS events
Cell changes
YJS events
Returns all or a single metadata associated with the cell.
cell's metadata.
Returns a metadata associated with the cell.
Cell's metadata.
Metadata key to get
Sets all or a single cell metadata.
If only one argument is provided, it will override all cell metadata. Otherwise a single key will be set to a new value.
Cell's metadata key or cell's metadata.
Sets a cell metadata.
Cell's metadata key.
Metadata value
Perform a transaction. While the function f is called, all changes to the shared document are bundled into a single event.
Transaction to execute
Whether to track the change in the action history or not (default true
)
Static
createGenerated using TypeDoc
Shareable code cell.