{"_id":"@amrn/react-simplemde","_rev":"1-7b851c9c15f80a8781ff9f797f7c9bd2","name":"@amrn/react-simplemde","description":"Produce universal library with webpack and es6","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@amrn/react-simplemde","version":"1.0.0","description":"Produce universal library with webpack and es6","main":"lib/react-simplemde.js","scripts":{"build":"webpack --env dev && webpack --env build && npm run test","dev":"webpack --progress --colors --watch --env dev","test":"mocha --require babel-core/register --colors ./test/*.spec.js","test:watch":"mocha --require babel-core/register --colors -w ./test/*.spec.js"},"repository":{"type":"git","url":"git+https://github.com/krasimir/webpack-library-starter.git"},"keywords":["webpack","es6","starter","library","universal","umd","commonjs"],"author":{"name":"Krasimir Tsonev"},"license":"MIT","bugs":{"url":"https://github.com/krasimir/webpack-library-starter/issues"},"homepage":"https://github.com/krasimir/webpack-library-starter","dependencies":{"@amrn/simplemde":"^1.11.3"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-eslint":"^8.2.1","babel-loader":"^7.1.2","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-class-properties":"^6.24.1","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","chai":"^4.1.2","css-loader":"^0.28.8","eslint":"^4.15.0","eslint-loader":"^1.9.0","eslint-plugin-react":"^7.5.1","extract-text-webpack-plugin":"^3.0.2","mocha":"^4.0.1","webpack":"^3.10.0","yargs":"^10.0.3"},"peerDependencies":{"react":"^16.2.0"},"gitHead":"44ded0c983312c3529e2a6253a3d8e4099f662b5","_id":"@amrn/react-simplemde@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"amrn","email":"amr.noman@outlook.com"},"dist":{"integrity":"sha512-rQtoMNv/Ca78bBg8WkGb6C7kkFg1mu9Na/yRlX7BqtmFZIBQ+AsgLYHRvaEyvFhSCHMopX9zRuhO2S6JrZANJg==","shasum":"152385606df770e687cbc1193bd05acdd6e35824","tarball":"https://registry.npmjs.org/@amrn/react-simplemde/-/react-simplemde-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1d6LxhSHfFriFMcW+i5gUm8RSZT3FjrG+Jg2HKcy9vgIgTL/LmKkebwlnTWq2n4rT8F3QMS+z219lWKmBCaJrWlA="}]},"maintainers":[{"name":"amrn","email":"amr.noman@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-simplemde-1.0.0.tgz_1515796937194_0.8719492047093809"}}},"readme":"# React SimpleMDE Markdown Editor\n[![NPM version][npm-badge]][npm]\n\nReact component wrapper for\n[SimpleMDE](https://github.com/NextStepWebs/simplemde-markdown-editor).\n\n> Based on [react-simplemde-editor](https://github.com/RIP21/react-simplemde-editor)\n> This one uses my [custom](https://github.com/AmrN/simplemde-markdown-editor) Simplemde Editor\n\nOnly two dependencies, React and SimpleMDE.\n\n## Install\n```\nnpm install --save react-simplemde\n```\n\n## Demo\nhttp://www.benrlodge.com/projects/react-simplemde\n\nor view it locally:\n```\ngit clone https://github.com/amrn/react-simplemde.git\ncd react-simplemde\nnpm install && npm run dev\ncd example\nnpm install && npm start\n```\n\n## Usage\nView the [demo code](https://github.com/amrn/react-simplemde/tree/master/example) for a full example.\n\nNot required, but useless without it, the `onChange` callback is the only option you need to set.\n\n```javascript\nimport React from 'react'\nimport SimpleMDE from '@amrn/react-simplemde'\n\n<SimpleMDE\n  onChange={this.handleChange}\n/>\n```\n\n## Options\nSet additional [SimpleMDE options](https://github.com/NextStepWebs/simplemde-markdown-editor#configuration) with an options prop.\n\nNote - while SimpleMDE options has an `initialValue` option, this component only takes a `value` prop which is set as the `initialValue` on first render.\n\n```javascript\nimport React from 'react'\nimport SimpleMDE from '@amrn/react-simplemde'\n\n<SimpleMDE\n  onChange={this.handleChange}\n  value={this.state.textValue}\n  options={{\n    autofocus: true,\n    spellChecker: false,\n    // etc.\n  }}\n/>\n```\n\nYou can include key maps using the `extraKeys` prop.\nRead more at https://codemirror.net/doc/manual.html#option_extraKeys\n\n```javascript\nextraKeys = {\n  Up: function(cm) {\n    cm.replaceSelection(\" surprise. \");\n  },\n  Down: function(cm) {\n    cm.replaceSelection(\" surprise again! \");\n  }\n};\n\n<SimpleMDE\n  onChange={this.handleChange}\n  extraKeys={extraKeys}\n/>\n```\n\n[npm-badge]: http://badge.fury.io/js/react-simplemde.svg\n[npm]: http://badge.fury.io/js/react-simplemde","maintainers":[{"name":"amrn","email":"amr.noman@outlook.com"}],"time":{"modified":"2022-04-04T13:53:01.119Z","created":"2018-01-12T22:42:18.513Z","1.0.0":"2018-01-12T22:42:18.513Z"},"homepage":"https://github.com/krasimir/webpack-library-starter","keywords":["webpack","es6","starter","library","universal","umd","commonjs"],"repository":{"type":"git","url":"git+https://github.com/krasimir/webpack-library-starter.git"},"author":{"name":"Krasimir Tsonev"},"bugs":{"url":"https://github.com/krasimir/webpack-library-starter/issues"},"license":"MIT","readmeFilename":"README.md"}