Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ContentFactory

The default implementation of an IContentFactory. A namespace for the notebook model content factory.

Hierarchy

  • ContentFactory

Index

Constructors

constructor

Properties

codeCellContentFactory

codeCellContentFactory: IContentFactory

The factory for code cell content.

modelDB

modelDB: IModelDB | undefined

The IModelDB in which to put the notebook data.

Methods

clone

createCell

  • createCell(type: nbformat.CellType, opts: IOptions): ICellModel
  • Create a new cell by cell type.

    Parameters

    • type: nbformat.CellType
    • opts: IOptions

    Returns ICellModel

createCodeCell

  • createCodeCell(options: IOptions): ICodeCellModel
  • Create a new code cell.

    Parameters

    • options: IOptions

    Returns ICodeCellModel

    A new code cell. If a source cell is provided, the new cell will be initialized with the data from the source. If the contentFactory is not provided, the instance codeCellContentFactory will be used.

createMarkdownCell

  • createMarkdownCell(options: IOptions): IMarkdownCellModel
  • Create a new markdown cell.

    Parameters

    • options: IOptions

    Returns IMarkdownCellModel

    A new markdown cell. If a source cell is provided, the new cell will be initialized with the data from the source.

createRawCell

  • createRawCell(options: IOptions): IRawCellModel
  • Create a new raw cell.

    Parameters

    • options: IOptions

    Returns IRawCellModel

    A new raw cell. If a source cell is provided, the new cell will be initialized with the data from the source.

Generated using TypeDoc