Base 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
{ notebook?: The notebook the cell is attached to }
Optional
ymetadata: YMap<any>Cell metadata
Private
_awarenessPrivate
_changedPrivate
_disposedPrivate
_isProtected
_metadataProtected
_notebookThe notebook that this cell belongs to.
Private
_prevPrivate
_undoPrivate
_ymetadataPrivate
_ysourceReadonly
ymodelCell notebook awareness or null if the cell is standalone.
The type of the cell.
The changed signal.
Signal emitted when the cell is disposed.
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
Private
_modelProtected
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
Implements an API for nbformat.IBaseCell.