How to use the @jupyterlab/cells.MarkdownCell function in @jupyterlab/cells

To help you get started, we’ve selected a few @jupyterlab/cells examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jupyterlab / jupyterlab / tests / test-cells / src / widget.spec.ts View on Github external
it('should dispose of the resources held by the widget', () => {
        const widget = new MarkdownCell({ model, rendermime, contentFactory });
        widget.initializeState();
        widget.dispose();
        expect(widget.isDisposed).toEqual(true);
      });
github jupyterlab / jupyterlab / tests / test-cells / src / widget.spec.ts View on Github external
it('should default to true', async () => {
        const widget = new MarkdownCell({ model, rendermime, contentFactory });
        widget.initializeState();
        Widget.attach(widget, document.body);
        expect(widget.rendered).toEqual(true);
        await framePromise();
        expect(widget.node.classList.contains(RENDERED_CLASS)).toEqual(true);
      });
github jupyterlab / jupyterlab-data-explorer / tests / test-cells / src / widget.spec.ts View on Github external
it('should unrender the widget', async () => {
        const widget = new MarkdownCell({ model, rendermime, contentFactory });
        widget.initializeState();
        Widget.attach(widget, document.body);
        widget.rendered = false;
        await framePromise();
        expect(widget.node.classList.contains(RENDERED_CLASS)).toEqual(false);
        widget.dispose();
      });
    });
github jupyterlab / jupyterlab-data-explorer / tests / test-cells / src / widget.spec.ts View on Github external
it('should be safe to call multiple times', () => {
        const widget = new MarkdownCell({ model, rendermime, contentFactory });
        widget.initializeState();
        widget.dispose();
        widget.dispose();
        expect(widget.isDisposed).toEqual(true);
      });
    });
github jupyterlab / jupyterlab / tests / test-cells / src / widget.spec.ts View on Github external
it('should accept a custom contentFactory', () => {
        const widget = new MarkdownCell({ model, rendermime, contentFactory });
        widget.initializeState();
        expect(widget).toBeInstanceOf(MarkdownCell);
      });
github jupyterlab / jupyterlab-data-explorer / jupyterlab / packages / notebook / src / widget.ts View on Github external
createMarkdownCell(
      options: MarkdownCell.IOptions,
      parent: StaticNotebook
    ): MarkdownCell {
      if (!options.contentFactory) {
        options.contentFactory = this;
      }
      return new MarkdownCell(options);
    }
github yuvipanda / simplest-notebook / packages / chatbox / src / chatbox.ts View on Github external
createCell(options: MarkdownCell.IOptions): MarkdownCell {
      return new MarkdownCell(options);
    }
  }
github yuvipanda / simplest-notebook / packages / notebook / src / widget.ts View on Github external
createMarkdownCell(options: MarkdownCell.IOptions, parent: StaticNotebook): MarkdownCell {
      if (!options.contentFactory) {
        options.contentFactory = this;
      }
      return new MarkdownCell(options);
    }
github jupyterlab / jupyterlab / packages / chatbox / src / chatbox.ts View on Github external
createCell(options: MarkdownCell.IOptions): MarkdownCell {
      return new MarkdownCell(options);
    }
  }
github jupyterlab / jupyterlab / packages / notebook / src / widget.ts View on Github external
createMarkdownCell(
      options: MarkdownCell.IOptions,
      parent: StaticNotebook
    ): MarkdownCell {
      if (!options.contentFactory) {
        options.contentFactory = this;
      }
      return new MarkdownCell(options).initializeState();
    }