How to use the @jupyterlab/outputarea.OutputArea.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 voila-dashboards / voila / js / output.js View on Github external
render() {
        super.render();
        this._outputView = new OutputArea({
            rendermime: this.model.widget_manager.renderMime,
            contentFactory: OutputArea.defaultContentFactory,
            model: this.model.outputs
        });
        this.pWidget.insertWidget(0, this._outputView);
        this.pWidget.addClass('jupyter-widgets');
        this.pWidget.addClass('widget-output');
        this.update(); // Set defaults.
    }
github pbugnion / ipywidgets_server / js / output.js View on Github external
render() {
        super.render();
        this._outputView = new OutputArea({
            rendermime: renderMime,
            contentFactory: OutputArea.defaultContentFactory,
            model: this.model.outputs
        });
        this.pWidget.insertWidget(0, this._outputView);

        this.pWidget.addClass('jupyter-widgets');
        this.pWidget.addClass('widget-output');
        this.update(); // Set defaults.
    }
github minrk / thebelab / src / output.js View on Github external
render() {
    super.render();
    this._outputView = new OutputArea({
      rendermime: this.model.widget_manager.renderMime,
      contentFactory: OutputArea.defaultContentFactory,
      model: this.model.outputs,
    });
    this.pWidget.insertWidget(0, this._outputView);
    this.pWidget.addClass("jupyter-widgets");
    this.pWidget.addClass("widget-output");
    this.update(); // Set defaults.
  }
github jupyter-widgets / ipywidgets / packages / jupyterlab-manager / src / output.ts View on Github external
render() {
    super.render();
    this._outputView = new OutputArea({
      rendermime: this.model.widget_manager.rendermime,
      contentFactory: OutputArea.defaultContentFactory,
      model: this.model.outputs
    });
    // TODO: why is this a readonly property now?
    // this._outputView.model = this.model.outputs;
    // TODO: why is this on the model now?
    // this._outputView.trusted = true;
    this.pWidget.insertWidget(0, this._outputView);

    this.pWidget.addClass('jupyter-widgets');
    this.pWidget.addClass('widget-output');
    this.update(); // Set defaults.
  }
github jupyterlab / jupyterlab / tests / test-outputarea / src / widget.spec.ts View on Github external
it('should take an optional contentFactory', () => {
        const contentFactory = Object.create(OutputArea.defaultContentFactory);
        const widget = new OutputArea({ rendermime, contentFactory, model });
        expect(widget.contentFactory).to.equal(contentFactory);
      });
    });
github jupyterlab / jupyterlab-data-explorer / tests / test-outputarea / src / widget.spec.ts View on Github external
it('should be a `contentFactory` instance', () => {
        expect(OutputArea.defaultContentFactory).to.be.an.instanceof(
          OutputArea.ContentFactory
        );
      });
    });
github jupyterlab / jupyterlab-data-explorer / tests / test-outputarea / src / widget.spec.ts View on Github external
it('should take an optional contentFactory', () => {
        const contentFactory = Object.create(OutputArea.defaultContentFactory);
        const widget = new OutputArea({ rendermime, contentFactory, model });
        expect(widget.contentFactory).to.equal(contentFactory);
      });
    });
github jupyterlab / jupyterlab / tests / test-outputarea / src / widget.spec.ts View on Github external
it('should be a `contentFactory` instance', () => {
        expect(OutputArea.defaultContentFactory).to.be.an.instanceof(
          OutputArea.ContentFactory
        );
      });
    });