{"_id":"@alexkuz/draft-js-plugins","_rev":"3-0a1655b2b53bfaab8d0d4f42861c159a","name":"@alexkuz/draft-js-plugins","description":"A Plugin Architecture on top of Draft.JS","dist-tags":{"temp":"0.0.0","latest":"0.0.0"},"versions":{"0.0.0":{"name":"@alexkuz/draft-js-plugins","version":"0.0.0","description":"A Plugin Architecture on top of Draft.JS","author":{"name":"Nik Graf","email":"nik@nikgraf.com","url":"http://www.nikgraf.com"},"repository":{"type":"git","url":"git+https://github.com/nikgraf/draft-js-plugins.git"},"main":"lib/index.js","keywords":["editor","wysiwyg","draft","react","ux","components","widget","react-component"],"peerDependencies":{"react":">=0.14.0 || 15.0.0-rc.2","react-dom":">=0.14.0 || 15.0.0-rc.2"},"scripts":{"build":"BABEL_ENV=production ./node_modules/.bin/babel --out-dir='lib' --ignore='__tests__/*' src","prepublish":"npm run build","postpublish":"./scripts/publish_gh_pages.sh","test":"mocha --compilers js:babel-core/register --require testHelper.js src/**/__test__/*.js","test:watch":"npm test -- --watch","lint":"npm run lint:eslint && npm run lint:jscs && npm run lint:flow","lint:eslint":"eslint --rule 'mocha/no-exclusive-tests:2' ./","lint:eslint:fix":"eslint --fix --rule 'mocha/no-exclusive-tests:2' ./","lint:jscs":"jscs ./","lint:jscs:src":"jscs src","lint:jscs:examples":"jscs examples --max-old-space-size=4096","lint:jscs:docs":"jscs docs","lint:flow":"flow status","alex":"alex README.md"},"devDependencies":{"alex":"^2.0.1","autoprefixer":"^6.3.3","babel-cli":"^6.6.5","babel-core":"^6.7.2","babel-eslint":"^5.0.0","babel-jest":"^9.0.3","babel-loader":"^6.2.4","babel-plugin-react-transform":"^2.0.2","babel-preset-es2015":"^6.6.0","babel-preset-react":"^6.5.0","babel-preset-react-hmre":"^1.1.1","babel-preset-stage-0":"^6.5.0","chai":"^3.5.0","chai-enzyme":"^0.4.1","cheerio":"^0.20.0","css-loader":"^0.23.1","css-modules-require-hook":"^4.0.0","dirty-chai":"^1.2.2","enzyme":"^2.1.0","eslint":"^2.4.0","eslint-config-airbnb":"6.1.0","eslint-plugin-mocha":"^2.0.0","eslint-plugin-react":"^4.2.3","estraverse-fb":"^1.3.1","extract-text-webpack-plugin":"^1.0.1","flow-bin":"^0.22.1","jest-cli":"^0.9.2","jscs":"^2.11.0","mocha":"^2.4.5","postcss-loader":"^0.8.2","react":"^15.0.0-rc.2","react-addons-test-utils":"^15.0.0-rc.2","react-dom":"^15.0.0-rc.2","react-transform-catch-errors":"^1.0.2","react-transform-hmr":"^1.0.4","redbox-react":"^1.2.2","style-loader":"^0.13.0","webpack":"^1.12.14","webpack-dev-middleware":"^1.5.1","webpack-hot-middleware":"=2.10.0"},"license":"MIT","dependencies":{"draft-js":"^0.2.2","immutable":"^3.7.6","linkify-it":"1.2.0","tlds":"1.99.0"},"gitHead":"affcbdda30c8b5550dd80f07a5544b79f34a8780","bugs":{"url":"https://github.com/nikgraf/draft-js-plugins/issues"},"homepage":"https://github.com/nikgraf/draft-js-plugins#readme","_id":"@alexkuz/draft-js-plugins@0.0.0","_shasum":"919b7dc8e90f8c2d3ec899df9150757e23364f2e","_from":".","_npmVersion":"3.7.3","_nodeVersion":"4.3.1","_npmUser":{"name":"alexkuz","email":"alexkuz@gmail.com"},"maintainers":[{"name":"alexkuz","email":"alexkuz@gmail.com"}],"dist":{"shasum":"919b7dc8e90f8c2d3ec899df9150757e23364f2e","tarball":"https://registry.npmjs.org/@alexkuz/draft-js-plugins/-/draft-js-plugins-0.0.0.tgz","integrity":"sha512-tOVmnVKL3/psswCmyXK3tAOzEScsvflttk0c8PlTaKj8a33G+ufMqY6asPtWfC1XJS+Jz7QhqoR3U1jMwWdTPw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDULzXPZFv9IzkUDb9XEp13K3444x91GnUWAJvxi99GkwIhAMS31Ay1flfO583lJMJ9gCqJoU3KrZfwqFusMcHbwqiy"}]},"_npmOperationalInternal":{"host":"packages-13-west.internal.npmjs.com","tmp":"tmp/draft-js-plugins-0.0.0.tgz_1458616260593_0.672339143930003"}}},"readme":"# DraftJS Plugins\n\n![Draft JS Plugins Logo](https://dl.dropboxusercontent.com/u/40735/draft-js-plugins.svg)\n\nHigh quality plugins with great UX on to of [DraftJS](https://github.com/facebook/draft-js).\n\n## Available Plugins\n\n- Stickers\n- Hashtags\n- Linkify\n- Mentions\n\n[![Build Status](https://travis-ci.org/draft-js-plugins/draft-js-plugins.svg?branch=master)](https://travis-ci.org/draft-js-plugins/draft-js-plugins)\n\n## Live Example\n\nCheckout [the website](https://www.draft-js-plugins.com/)!\n\n## Usage\n\nFirst, install the editor with `npm`:\n\n```\n$ npm install draft-js-plugins-editor --save\n```\n\nand then import it somewhere in your code and you're ready to go!\n\n```js\nimport Editor from 'draft-js-plugins-editor';\n```\n\n## Documentation\n\n### draft-js-plugins-editor\n\n#### Editor\n\nAn editor component accepting plugins.\n\n| Props                                          | Description  | Required\n| -----------------------------------------------|:------------:| -------:|\n| editorState                                    | [see here](https://facebook.github.io/draft-js/docs/api-reference-editor-state.html#content)| * |\n| onChange                                       | [see here](https://facebook.github.io/draft-js/docs/api-reference-editor.html#onchange)| * |\n| plugins                                        | an array of plugins |  |\n| all other props accepted by the DraftJS Editor | [see here](https://facebook.github.io/draft-js/docs/api-reference-editor.html#props) |  |\n\nUsage:\n\n```js\nimport React, { Component } from 'react';\nimport Editor from 'draft-js-plugins-editor';\nimport createHashtagPlugin from 'draft-js-hashtag-plugin';\nimport createLinkifyPlugin from 'draft-js-linkify-plugin';\nimport { EditorState } from 'draft-js';\n\nconst hashtagPlugin = createHashtagPlugin();\nconst linkifyPlugin = createLinkifyPlugin();\n\nconst plugins = [\n  hashtagPlugin,\n  linkifyPlugin,\n];\n\nexport default class UnicornEditor extends Component {\n\n  state = {\n    editorState: EditorState.createEmpty(),\n  };\n\n  onChange = (editorState) => {\n    this.setState({\n      editorState,\n    });\n  };\n\n  render() {\n    return (\n      <Editor\n        editorState={this.state.editorState}\n        onChange={this.onChange}\n        plugins={plugins}\n        spellCheck\n        readOnly={ this.state.readOnly }\n        ref=\"editor\"\n      />\n    );\n  }\n}\n```\n\n#### `createEditorStateWithText`\n\nFunction to creates an EditorState with some text.\n\nUsage:\n\n```js\nimport { createEditorStateWithText } from 'draft-js-plugins-editor';\n\nconst editorState = createEditorStateWithText('Hello World!', plugins);\n```\n\n### Plugins\n\n- `draft-js-sticker-plugin`\n- `draft-js-hastag-plugin`\n- `draft-js-linkify-plugin`\n\n#### How to write a Plugin\n\nFeel free to copy any of the existing plugins as a starting point. Feel free to directly contact @nikgraf in case you need help or open a Github Issue!\n\nMore documentation is coming soon…\n\n## Development\n\n```\nnpm install\ncd site\nnpm install\nnpm start\n```\n## Discussion and Support\nJoin the channel #plugin-editor after signing into the DraftJS [Slack organization](https://draftjs.herokuapp.com)!\n\n## License\n\nMIT\n","maintainers":[{"name":"alexkuz","email":"alexkuz@gmail.com"}],"time":{"modified":"2022-06-12T14:28:56.015Z","created":"2016-03-22T03:11:01.043Z","0.0.0":"2016-03-22T03:11:01.043Z"},"homepage":"https://github.com/nikgraf/draft-js-plugins#readme","keywords":["editor","wysiwyg","draft","react","ux","components","widget","react-component"],"repository":{"type":"git","url":"git+https://github.com/nikgraf/draft-js-plugins.git"},"author":{"name":"Nik Graf","email":"nik@nikgraf.com","url":"http://www.nikgraf.com"},"bugs":{"url":"https://github.com/nikgraf/draft-js-plugins/issues"},"license":"MIT","readmeFilename":"README.md"}