New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@nteract/editor

Package Overview
Dependencies
Maintainers
17
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nteract/editor

The editor that lives inside cells in nteract

10.1.12
latest
npm
Version published
Weekly downloads
1.8K
172.29%
Maintainers
17
Weekly downloads
 
Created
Source

@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

Keywords

nteract

FAQs

Package last updated on 20 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts