How to use the @jupyterlab/outputarea.OutputAreaWidget.defaultContentFactory function in @jupyterlab/outputarea

To help you get started, we’ve selected a few @jupyterlab/outputarea 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 / test / src / cells / widget.spec.ts View on Github external
it('should create an output area widget', () => {
          let factory = new CodeCellWidget.ContentFactory({ editorFactory });
          let model = new OutputAreaModel();
          let output = factory.createOutputArea({
            model,
            rendermime,
            contentFactory: OutputAreaWidget.defaultContentFactory
          });
          expect(output).to.be.an(OutputAreaWidget);
        });
github jupyterlab / jupyterlab / test / src / outputarea / widget.spec.ts View on Github external
it('should be a `contentFactory` instance', () => {
        expect(OutputAreaWidget.defaultContentFactory).to.be.an(OutputAreaWidget.ContentFactory);
      });
github jupyterlab / jupyterlab / test / src / outputarea / widget.spec.ts View on Github external
it('should take an optional contentFactory', () => {
        let contentFactory = Object.create(OutputAreaWidget.defaultContentFactory);
        let widget = new OutputAreaWidget({ rendermime, contentFactory, model });
        expect(widget.contentFactory).to.be(contentFactory);
      });