How to use @jupyterlab/attachments - 6 common examples

To help you get started, we’ve selected a few @jupyterlab/attachments 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 / packages / cells / src / widget.ts View on Github external
constructor(options: MarkdownCell.IOptions) {
    super(options);
    this.addClass(MARKDOWN_CELL_CLASS);
    // Ensure we can resolve attachments:
    this._rendermime = options.rendermime.clone({
      resolver: new AttachmentsResolver({
        parent: options.rendermime.resolver,
        model: this.model.attachments
      })
    });

    // Throttle the rendering rate of the widget.
    this._monitor = new ActivityMonitor({
      signal: this.model.contentChanged,
      timeout: RENDER_TIMEOUT
    });
    this._monitor.activityStopped.connect(() => {
      if (this._rendered) {
        this.update();
      }
    }, this);
github jupyterlab / jupyterlab-data-explorer / jupyterlab / packages / cells / src / widget.ts View on Github external
constructor(options: MarkdownCell.IOptions) {
    super(options);
    this.addClass(MARKDOWN_CELL_CLASS);
    // Ensure we can resolve attachments:
    this._rendermime = options.rendermime.clone({
      resolver: new AttachmentsResolver({
        parent: options.rendermime.resolver,
        model: this.model.attachments
      })
    });

    // Throttle the rendering rate of the widget.
    this._monitor = new ActivityMonitor({
      signal: this.model.contentChanged,
      timeout: RENDER_TIMEOUT
    });
    this._monitor.activityStopped.connect(
      () => {
        if (this._rendered) {
          this.update();
        }
      },
github jupyterlab / jupyterlab / packages / cells / src / widget.ts View on Github external
constructor(options: MarkdownCell.IOptions) {
    super(options);
    this.addClass(MARKDOWN_CELL_CLASS);
    // Ensure we can resolve attachments:
    this._rendermime = options.rendermime.clone({
      resolver: new AttachmentsResolver({
        parent: options.rendermime.resolver,
        model: this.model.attachments
      })
    });

    // Throttle the rendering rate of the widget.
    this._monitor = new ActivityMonitor({
      signal: this.model.contentChanged,
      timeout: RENDER_TIMEOUT
    });
    this._monitor.activityStopped.connect(() => {
      if (this._rendered) {
        this.update();
      }
    }, this);
github jupyterlab / jupyterlab / packages / cells / src / model.ts View on Github external
createAttachmentsModel(
      options: IAttachmentsModel.IOptions
    ): IAttachmentsModel {
      return new AttachmentsModel(options);
    }
  }
github jupyterlab / jupyterlab-data-explorer / jupyterlab / packages / cells / src / model.ts View on Github external
createAttachmentsModel(
      options: IAttachmentsModel.IOptions
    ): IAttachmentsModel {
      return new AttachmentsModel(options);
    }
  }
github jupyterlab / jupyterlab / packages / cells / src / model.ts View on Github external
createAttachmentsModel(
      options: IAttachmentsModel.IOptions
    ): IAttachmentsModel {
      return new AttachmentsModel(options);
    }
  }

@jupyterlab/attachments

JupyterLab - Notebook Cell Attachments

BSD-3-Clause
Latest version published 6 days ago

Package Health Score

95 / 100
Full package analysis

Similar packages