How to use the @jupyterlab/codemirror.CodeMirrorEditor function in @jupyterlab/codemirror

To help you get started, we’ve selected a few @jupyterlab/codemirror 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-console / src / history.spec.ts View on Github external
it('should be called upon an editor edge request', async () => {
        const history = new TestHistory({ session });
        expect(history.methods).to.not.contain('onEdgeRequest');
        const host = document.createElement('div');
        const model = new CodeEditor.Model();
        const editor = new CodeMirrorEditor({ model, host });
        history.editor = editor;
        history.push('foo');
        const promise = signalToPromise(editor.model.value.changed);
        editor.edgeRequested.emit('top');
        expect(history.methods).to.contain('onEdgeRequest');
        await promise;
        expect(editor.model.value.text).to.equal('foo');
      });
    });
github jupyterlab / jupyterlab / tests / test-console / src / history.spec.ts View on Github external
it('should be called upon an editor text change', () => {
        const history = new TestHistory({ session });
        expect(history.methods).to.not.contain('onTextChange');
        const model = new CodeEditor.Model();
        const host = document.createElement('div');
        const editor = new CodeMirrorEditor({ model, host });
        history.editor = editor;
        model.value.text = 'foo';
        expect(history.methods).to.contain('onTextChange');
      });
    });
github jupyterlab / jupyterlab-data-explorer / tests / test-completer / src / handler.spec.ts View on Github external
const factory = (options: CodeEditor.IOptions) => {
    return new CodeMirrorEditor(options);
  };
  return new CodeEditorWrapper({ factory, model });
github jupyterlab / jupyterlab / tests / test-completer / src / widget.spec.ts View on Github external
let factory = (options: CodeEditor.IOptions) => {
    return new CodeMirrorEditor(options);
  };
  return new CodeEditorWrapper({ factory, model });
github jupyterlab / jupyterlab / tests / test-completer / src / widget.spec.ts View on Github external
let factory = (options: CodeEditor.IOptions) => {
    return new CodeMirrorEditor(options);
  };
  return new CodeEditorWrapper({ factory, model });
github jupyterlab / jupyterlab-data-explorer / tests / test-completer / src / widget.spec.ts View on Github external
let factory = (options: CodeEditor.IOptions) => {
    return new CodeMirrorEditor(options);
  };
  return new CodeEditorWrapper({ factory, model });
github jupyterlab / jupyterlab / tests / test-completer / src / handler.spec.ts View on Github external
const factory = (options: CodeEditor.IOptions) => {
    return new CodeMirrorEditor(options);
  };
  return new CodeEditorWrapper({ factory, model });