Natural Pleistocene Monsters
    Have ideas to improve npm?Join in the discussion! »

    @nteract/editor
    TypeScript icon, indicating that this package has built-in type declarations

    10.1.12 • Public • Published

    @nteract/editor

    This package contains components for rendering CodeMirror editors in our nteract applications. To see this package in action, you can view the source code for the nteract play application.

    Installation

    $ yarn add @nteract/editor
    
    $ npm install --save @nteract/editor
    

    Usage

    The example below shows how we can use this package to create a simple code editor component.

    import CodeMirrorEditor from "@nteract/editor";
    
    <CodeMirrorEditor
      cellFocused
      editorFocused
      completion
      theme="light"
      id="just-a-cell"
      onFocusChange={() => {}}
      focusAbove={() => {}}
      focusBelow={() => {}}
      kernelStatus={"not connected"}
      options={{
        lineNumbers: true,
        extraKeys: {
          "Ctrl-Space": "autocomplete",
          "Ctrl-Enter": () => {},
          "Cmd-Enter": () => {}
        },
        cursorBlinkRate: 0,
        mode: "python"
      }}
      value={"import pandas as pd"}
      onChange={() => {}}
    />;

    Documentation

    We're working on adding more documentation for this component. Stay tuned by watching this repository!

    Support

    If you experience an issue while using this package or have a feature request, please file an issue on the issue board and add the pkg:editor label.

    License

    BSD-3-Clause

    Install

    npm i @nteract/editor

    DownloadsWeekly Downloads

    912

    Version

    10.1.12

    License

    BSD-3-Clause

    Unpacked Size

    1.04 MB

    Total Files

    56

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar