Socket
Book a DemoInstallSign in
Socket

draft-js-gutter

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

draft-js-gutter

A component that compliments Draft.js with a line number gutter.

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

Draft.js Gutter

A component that compliments Draft.js with a line number/letter gutter.

To Use

Install:

npm install draft-js draft-js-gutter --save

Example:

import React from 'react';
import ReactDOM from 'react-dom';
import { EditorGutter } from './Draft-js-gutter';

ReactDOM.render(
  <EditorGutter
    style={{border: '1px solid black'}}
    styleList={{background: '#eee'}} />
, document.getElementById('root'));

Props:

  • editor {object} - Spreads all props to the editor
  • editorState - Accepts whatever you want the editor component's default state to be. Creates empty editorState if no property specified.
  • list {object} - List object accepts all html attributes for ol elements as properties
  • style {object}
  • styleEditor {object}
  • styleList {object}
  • styleListItem {object}

To Contribute

To Develop:

git clone https://github.com/yepnamesjames/draft-js-gutter.git
cd draft-js-gutter
npm install
npm start

Navigate to localhost:3000.

To Build:

npm run build

Things that could make this better:

  • Accept the editor as a child component
  • Manipulate the editor's onChange to accept a prop and append necessary function
  • Default themes for styling

License

MIT

FAQs

Package last updated on 28 Feb 2016

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.