How to use the @jupyterlab/codeeditor/src.CodeEditor.Model 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 / editor.spec.ts View on Github external
it('should create a CodeEditor Model with an initial value', () => {
      let other = new CodeEditor.Model({ value: 'Initial text here' });
      expect(other).to.be.an.instanceof(CodeEditor.Model);
      expect(other.value.text).to.equal('Initial text here');
      other.dispose();
    });
github jupyterlab / jupyterlab / tests / test-codeeditor / src / editor.spec.ts View on Github external
it('should create a CodeEditor Model with an initial mimetype', () => {
      let other = new CodeEditor.Model({
        value: 'import this',
        mimeType: 'text/x-python'
      });
      expect(other).to.be.an.instanceof(CodeEditor.Model);
      expect(other.mimeType).to.equal('text/x-python');
      expect(other.value.text).to.equal('import this');
      other.dispose();
    });
  });