How to use the @jupyterlab/codeeditor.JSONEditor function in @jupyterlab/codeeditor

To help you get started, we’ve selected a few @jupyterlab/codeeditor 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-codeeditor / src / jsoneditor.spec.ts View on Github external
it('should create a new metadata editor', () => {
        let newEditor = new JSONEditor({ editorFactory });
        expect(newEditor).to.be.an.instanceof(JSONEditor);
      });
    });
github jupyterlab / jupyterlab / test / src / apputils / jsoneditor.spec.ts View on Github external
it('should create a new metadata editor', () => {
        let newEditor = new JSONEditor({ editorFactory });
        expect(newEditor).to.be.a(JSONEditor);
      });
github jupyterlab / jupyterlab-data-explorer / tests / test-codeeditor / src / jsoneditor.spec.ts View on Github external
it('should create a new metadata editor', () => {
        let newEditor = new JSONEditor({ editorFactory });
        expect(newEditor).to.be.an.instanceof(JSONEditor);
      });
    });
github jupyterlab / jupyterlab / test / src / apputils / jsoneditor.spec.ts View on Github external
it ('should be settable in the constructor', () => {
        let newEditor = new JSONEditor({ editorFactory, collapsible: true });
        expect(newEditor.collapsible).to.be(true);
      });
github jupyterlab / jupyterlab / test / src / apputils / jsoneditor.spec.ts View on Github external
it ('should be settable in the constructor', () => {
        let newEditor = new JSONEditor({ editorFactory, title: 'foo' });
        expect(newEditor.editorTitle).to.be('foo');
      });
github jupyterlab / jupyterlab-data-explorer / jupyterlab / packages / notebook / src / notebooktools.ts View on Github external
constructor(options: MetadataEditorTool.IOptions) {
      super();
      const { editorFactory } = options;
      this.addClass('jp-MetadataEditorTool');
      let layout = (this.layout = new PanelLayout());
      this.editor = new JSONEditor({
        editorFactory
      });
      this.editor.title.label = options.label || 'Edit Metadata';
      const titleNode = new Widget({ node: document.createElement('label') });
      titleNode.node.textContent = options.label || 'Edit Metadata';
      layout.addWidget(titleNode);
      layout.addWidget(this.editor);
    }
github jupyterlab / jupyterlab / packages / notebook / src / notebooktools.ts View on Github external
constructor(options: MetadataEditorTool.IOptions) {
      super();
      const { editorFactory } = options;
      this.addClass('jp-MetadataEditorTool');
      let layout = (this.layout = new PanelLayout());
      this.editor = new JSONEditor<
        INotebookData.Schema | ICellData.Schema,
        'metadata'
      >({
        editorFactory
      });
      this.editor.title.label = options.label || 'Edit Metadata';
      const titleNode = new Widget({ node: document.createElement('label') });
      titleNode.node.textContent = options.label || 'Edit Metadata';
      layout.addWidget(titleNode);
      layout.addWidget(this.editor);
    }
github jupyterlab / jupyterlab-data-explorer / packages / notebook / src / notebooktools.ts View on Github external
constructor(options: MetadataEditorTool.IOptions) {
      super();
      const { editorFactory } = options;
      this.addClass('jp-MetadataEditorTool');
      let layout = (this.layout = new PanelLayout());
      this.editor = new JSONEditor({
        editorFactory
      });
      this.editor.title.label = options.label || 'Edit Metadata';
      const titleNode = new Widget({ node: document.createElement('label') });
      titleNode.node.textContent = options.label || 'Edit Metadata';
      layout.addWidget(titleNode);
      layout.addWidget(this.editor);
    }
github jupyterlab / jupyterlab / packages / settingeditor-extension / src / settingeditor.ts View on Github external
constructor(options: PluginEditor.IOptions) {
    super();
    this.addClass(PLUGIN_EDITOR_CLASS);

    const { editorFactory } = options;
    const collapsible = false;
    const layout = this.layout = new PanelLayout();
    const panel = this._panel = new SplitPanel({
      orientation: 'vertical',
      renderer: SplitPanel.defaultRenderer,
      spacing: 1
    });

    this.handleMoved = panel.handleMoved;
    this._editor = new JSONEditor({ collapsible, editorFactory });
    this._fieldset = new PluginFieldset();

    layout.addWidget(panel);
    panel.addWidget(this._editor);
    panel.addWidget(this._fieldset);
  }