How to use the @jupyterlab/rendermime.RenderMime.UrlResolver function in @jupyterlab/rendermime

To help you get started, we’ve selected a few @jupyterlab/rendermime 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 / rendermime / rendermime.spec.ts View on Github external
}).then(s => {
          session = s;
          resolver = new RenderMime.UrlResolver({
            session,
            contents: manager.contents
          });
        }).then(done, done);
      });
github yuvipanda / simplest-notebook / test / src / rendermime / rendermime.spec.ts View on Github external
}).then(s => {
          session = s;
          resolver = new RenderMime.UrlResolver({
            session,
            contents: manager.contents
          });
        }).then(done, done);
      });
github yuvipanda / simplest-notebook / packages / console / src / panel.ts View on Github external
options.contentFactory || ConsolePanel.defaultContentFactory
    );
    let count = Private.count++;
    if (!path) {
      path = `${basePath || ''}/console-${count}-${uuid()}`;
    }

    let session = this._session = new ClientSession({
      manager: manager.sessions,
      path,
      name: name || `Console ${count}`,
      type: 'console',
      kernelPreference: options.kernelPreference
    });

    let resolver = new RenderMime.UrlResolver({
      session,
      contents: manager.contents
    });
    rendermime = rendermime.clone({ resolver });

    this.console = contentFactory.createConsole({
      rendermime, session, mimeTypeService, contentFactory, modelFactory
    });
    this.addWidget(this.console);

    session.ready.then(() => {
      this._connected = new Date();
      this._updateTitle();
      this.console.promptCell.editor.focus();
    });