Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected _notebook

_notebook: YNotebook

The notebook that this cell belongs to.

isDisposed

isDisposed: boolean

Test whether the object has been disposed.

Notes

This property is always safe to access.

isStandalone

isStandalone: boolean

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.

ymodel

ymodel: YMap<any>

Accessors

awareness

  • get awareness(): Awareness
  • Returns Awareness

cell_type

  • get cell_type(): "markdown"
  • String identifying the type of cell.

    Returns "markdown"

changed

  • get changed(): ISignal<this, CellChange<Metadata>>

notebook

  • The notebook that this cell belongs to.

    Returns YNotebook

undoManager

  • get undoManager(): UndoManager
  • set undoManager(undoManager: UndoManager): void
  • The notebook that this cell belongs to.

    Returns UndoManager

  • Set the undoManager when adding new cells.

    Parameters

    • undoManager: UndoManager

    Returns void

ysource

  • get ysource(): YText
  • Returns YText

Methods

canRedo

  • canRedo(): boolean

canUndo

  • canUndo(): boolean

clearUndoHistory

  • clearUndoHistory(): void

clone

  • Clone the cell.

    todo

    clone should only be available in the specific implementations i.e. ISharedCodeCell

    Returns YBaseCell<any>

dispose

  • dispose(): void

getAttachments

  • getAttachments(): IAttachments

getId

  • getId(): string

getMetadata

getSource

  • getSource(): string

redo

  • redo(): void

setAttachments

  • setAttachments(attachments: IAttachments): void

setMetadata

setSource

  • setSource(value: string): void

toJSON

  • toJSON(): IMarkdownCell

transact

  • transact(f: () => void, undoable?: boolean): void
  • Perform a transaction. While the function f is called, all changes to the shared document are bundled into a single event.

    Parameters

    • f: () => void
        • (): void
        • Returns void

    • Optional undoable: boolean

    Returns void

undo

  • undo(): void

updateSource

  • updateSource(start: number, end: number, value?: string): void
  • Replace content from start' to endwithvalue`.

    Parameters

    • start: number
    • end: number
    • Optional value: string

    Returns void

Static create

  • Create a new YMarkdownCell that can be inserted into a YNotebook

    Parameters

    • Optional id: string

    Returns YMarkdownCell

Static createStandalone

  • Create a new YMarkdownCell that works standalone. It cannot be inserted into a YNotebook because the Yjs model is already attached to an anonymous Y.Doc instance.

    Parameters

    • Optional id: string

    Returns YMarkdownCell

Generated using TypeDoc