{"_id":"textio-draft-js-single-line-plugin","_rev":"108-fc3480665bbe7ef7b365c97a401bbd04","name":"textio-draft-js-single-line-plugin","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.2":{"name":"textio-draft-js-single-line-plugin","version":"0.0.2","keywords":["draft-js","draft-js-plugins","plugins","plugin"],"license":"MIT","_id":"textio-draft-js-single-line-plugin@0.0.2","maintainers":[{"name":"textio","email":"admin@textio.com"}],"homepage":"https://github.com/icelab/draft-js-single-line-plugin","bugs":{"url":"https://github.com/icelab/draft-js-single-line-plugin/issues"},"dist":{"shasum":"05dc4c106e47bf39bb655c8d1c58383ebcb9fb6a","tarball":"https://registry.npmjs.org/textio-draft-js-single-line-plugin/-/textio-draft-js-single-line-plugin-0.0.2.tgz","integrity":"sha512-U5H0yfKzKUBKphFeRaPJTT2VMHOmzGgRizlpFll3c0FjyKHPC3cdRrCSNoDLBuMxGlu+v1BjmaAF6MVqCv7FRg==","signatures":[{"sig":"MEQCIAlsmnIaxxWzFRrM69YhqBn5jjCwDt6FwJWEuPjtdEvKAiBfWgY4LeO7V4xhbzSsnA2eF4v5COSK/pDyCRAp3w6Jpw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","_shasum":"05dc4c106e47bf39bb655c8d1c58383ebcb9fb6a","authors":["Max Wheeler <max@icelab.com.au> (https://github.com/makenosound)"],"gitHead":"80a6737c4358c30594bfd7d26b2a5d7fc1f15dea","scripts":{"lint":"eslint 'src/*.js' 'src/**/*.js'; exit 0","test":"NODE_ENV=test babel-node test | faucet","build":"babel src --out-dir lib","clean":"rm -rf ./lib/*","compile":"npm run build","posttest":"npm run lint","precompile":"npm run clean","prepublish":"npm run compile"},"_npmUser":{"name":"textio","email":"admin@textio.com"},"repository":{"url":"git+https://github.com/icelab/draft-js-single-line-plugin.git","type":"git"},"_npmVersion":"3.10.7","description":"Restrict a draft-js editor to a single line of input.","directories":{},"_nodeVersion":"6.7.0","dependencies":{"immutable":"3.8.1"},"devDependencies":{"tape":"4.5.1","eslint":"2.8.0","faucet":"0.0.1","babel-cli":"6.7.5","is-function":"1.0.1","babel-preset-es2015":"6.6.0","eslint-plugin-promise":"1.3.1","eslint-config-standard":"5.1.0","eslint-plugin-standard":"1.3.2"},"peerDependencies":{"react":">=15.0.0","draft-js":">=0.7.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/textio-draft-js-single-line-plugin-0.0.2.tgz_1479849511285_0.3700368721038103","host":"packages-18-east.internal.npmjs.com"}},"0.0.3":{"name":"textio-draft-js-single-line-plugin","version":"0.0.3","keywords":["draft-js","draft-js-plugins","plugins","plugin"],"license":"MIT","_id":"textio-draft-js-single-line-plugin@0.0.3","maintainers":[{"name":"textio","email":"admin@textio.com"}],"homepage":"https://github.com/icelab/draft-js-single-line-plugin","bugs":{"url":"https://github.com/icelab/draft-js-single-line-plugin/issues"},"dist":{"shasum":"af6e6bb3afd55e802eb49051f52764bffd46240d","tarball":"https://registry.npmjs.org/textio-draft-js-single-line-plugin/-/textio-draft-js-single-line-plugin-0.0.3.tgz","integrity":"sha512-jseAUTDCySaKgTWSdwR7LJtkTRBWJFQiiWjBDcA0GMyqwqcNdGS6hhag3+w52KfXwzzlEK1HaxOeVDGg9YUrkA==","signatures":[{"sig":"MEUCICDQOqNKPQUTs9HwQ8kwVN8Lm5PiTBAm1vh5Fyp9XjoIAiEAyZU2dMxT/noF2X3gWHno8bN7FjeTdxP8nqOUgyz1hXs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","_shasum":"af6e6bb3afd55e802eb49051f52764bffd46240d","authors":["Max Wheeler <max@icelab.com.au> (https://github.com/makenosound)"],"gitHead":"2fb869439651145930cab62a8211a9b59584c20f","scripts":{"lint":"eslint 'src/*.js' 'src/**/*.js'; exit 0","test":"NODE_ENV=test babel-node test | faucet","build":"babel src --out-dir lib","clean":"rm -rf ./lib/*","compile":"npm run build","posttest":"npm run lint","precompile":"npm run clean","prepublish":"npm run compile"},"_npmUser":{"name":"textio","email":"admin@textio.com"},"repository":{"url":"git+https://github.com/icelab/draft-js-single-line-plugin.git","type":"git"},"_npmVersion":"3.10.7","description":"Restrict a draft-js editor to a single line of input.","directories":{},"_nodeVersion":"6.7.0","dependencies":{"immutable":"3.8.1"},"devDependencies":{"tape":"4.5.1","eslint":"2.8.0","faucet":"0.0.1","babel-cli":"6.7.5","is-function":"1.0.1","babel-preset-es2015":"6.6.0","eslint-plugin-promise":"1.3.1","eslint-config-standard":"5.1.0","eslint-plugin-standard":"1.3.2"},"peerDependencies":{"react":">=15.0.0","draft-js":">=0.7.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/textio-draft-js-single-line-plugin-0.0.3.tgz_1479849644190_0.4691456137225032","host":"packages-12-west.internal.npmjs.com"}},"0.0.4":{"name":"textio-draft-js-single-line-plugin","version":"0.0.4","keywords":["draft-js","draft-js-plugins","plugins","plugin"],"license":"MIT","_id":"textio-draft-js-single-line-plugin@0.0.4","maintainers":[{"name":"textio","email":"admin@textio.com"}],"homepage":"https://github.com/icelab/draft-js-single-line-plugin","bugs":{"url":"https://github.com/icelab/draft-js-single-line-plugin/issues"},"dist":{"shasum":"7a6b281634a57c9a855e6e59c1b0baeb73a85d61","tarball":"https://registry.npmjs.org/textio-draft-js-single-line-plugin/-/textio-draft-js-single-line-plugin-0.0.4.tgz","integrity":"sha512-47XTM9fjI2lxbRgrVSjjfXvNp9L8/NSB4V0JKfQNlOyrqT6qdGzk6hUSmE2LAKYJfHgYrAg7/BWJr31V8s5RkA==","signatures":[{"sig":"MEYCIQCN++4jivUPOP2gGzrqTQ1YLEBT/WrGimcDFXk3z74/CgIhAMvnR6mcJBJY/F4bncnBLDg9KuMWjJc+UPFWVlLqjkp1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","_shasum":"7a6b281634a57c9a855e6e59c1b0baeb73a85d61","authors":["Max Wheeler <max@icelab.com.au> (https://github.com/makenosound)"],"gitHead":"1c143cca51f800e827374e5c6c45f322bf47b1a3","scripts":{"lint":"eslint 'src/*.js' 'src/**/*.js'; exit 0","test":"NODE_ENV=test babel-node test | faucet","build":"babel src --out-dir lib","clean":"rm -rf ./lib/*","compile":"npm run build","posttest":"npm run lint","precompile":"npm run clean","prepublish":"npm run compile"},"_npmUser":{"name":"textio","email":"admin@textio.com"},"repository":{"url":"git+https://github.com/icelab/draft-js-single-line-plugin.git","type":"git"},"_npmVersion":"3.10.7","description":"Restrict a draft-js editor to a single line of input.","directories":{},"_nodeVersion":"6.7.0","dependencies":{"immutable":"3.8.1"},"devDependencies":{"tape":"4.5.1","eslint":"2.8.0","faucet":"0.0.1","babel-cli":"6.7.5","is-function":"1.0.1","babel-preset-es2015":"6.6.0","eslint-plugin-promise":"1.3.1","eslint-config-standard":"5.1.0","eslint-plugin-standard":"1.3.2"},"peerDependencies":{"react":">=15.0.0","draft-js":">=0.7.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/textio-draft-js-single-line-plugin-0.0.4.tgz_1479850090742_0.6888702234718949","host":"packages-18-east.internal.npmjs.com"}},"0.0.5":{"name":"textio-draft-js-single-line-plugin","version":"0.0.5","keywords":["draft-js","draft-js-plugins","plugins","plugin"],"license":"MIT","_id":"textio-draft-js-single-line-plugin@0.0.5","maintainers":[{"name":"textio","email":"admin@textio.com"}],"homepage":"https://github.com/icelab/draft-js-single-line-plugin","bugs":{"url":"https://github.com/icelab/draft-js-single-line-plugin/issues"},"dist":{"shasum":"88a411bd3ebec9501381f7dbaba3580b0c4d0087","tarball":"https://registry.npmjs.org/textio-draft-js-single-line-plugin/-/textio-draft-js-single-line-plugin-0.0.5.tgz","integrity":"sha512-DywR9TElmD/ryDVT6eQwWE1dTR2w7x6q2tVUB8O2YB5oH6VcfSvWsO3A+lqZWjPXwdpFCfRlnB6VM8Do+ZpRtQ==","signatures":[{"sig":"MEQCIG+6WNS/SoPNuk0Pg4W8vTVXd4scApFuSonN/JGaPi0uAiAmb1PatuMSltkKoypG0i3QI4paFn+D383fnJtZTPJMGg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","_shasum":"88a411bd3ebec9501381f7dbaba3580b0c4d0087","authors":["Max Wheeler <max@icelab.com.au> (https://github.com/makenosound)"],"gitHead":"4707a309648e598d72adfd0d9461cf3835f78ba9","scripts":{"lint":"eslint 'src/*.js' 'src/**/*.js'; exit 0","test":"NODE_ENV=test babel-node test | faucet","build":"babel src --out-dir lib","clean":"rm -rf ./lib/*","compile":"npm run build","posttest":"npm run lint","precompile":"npm run clean","prepublish":"npm run compile"},"_npmUser":{"name":"textio","email":"admin@textio.com"},"repository":{"url":"git+https://github.com/icelab/draft-js-single-line-plugin.git","type":"git"},"_npmVersion":"3.10.3","description":"Restrict a draft-js editor to a single line of input.","directories":{},"_nodeVersion":"6.6.0","dependencies":{"immutable":"3.8.1"},"devDependencies":{"tape":"4.5.1","eslint":"2.8.0","faucet":"0.0.1","babel-cli":"6.7.5","is-function":"1.0.1","babel-preset-es2015":"6.6.0","eslint-plugin-promise":"1.3.1","eslint-config-standard":"5.1.0","eslint-plugin-standard":"1.3.2"},"peerDependencies":{"react":">=15.0.0","draft-js":">=0.7.0-beta","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/textio-draft-js-single-line-plugin-0.0.5.tgz_1486014725566_0.22148509020917118","host":"packages-12-west.internal.npmjs.com"}},"0.0.6":{"name":"textio-draft-js-single-line-plugin","version":"0.0.6","keywords":["draft-js","draft-js-plugins","plugins","plugin"],"license":"MIT","_id":"textio-draft-js-single-line-plugin@0.0.6","maintainers":[{"name":"textio","email":"admin@textio.com"}],"homepage":"https://github.com/icelab/draft-js-single-line-plugin","bugs":{"url":"https://github.com/icelab/draft-js-single-line-plugin/issues"},"dist":{"shasum":"d501c1c083a54598aabefd965a26c5b625483024","tarball":"https://registry.npmjs.org/textio-draft-js-single-line-plugin/-/textio-draft-js-single-line-plugin-0.0.6.tgz","integrity":"sha512-F7tOAWet3DUDUi7bo/ziiE5V9zVg3H9AuqKrt5uP2fSeOp21IaTT7SGAjmZrp3WWqhRZPz4fU+GGTLbfHQtUOg==","signatures":[{"sig":"MEQCICGe0Pn0bEEA0y4E0Z7FB4mb2V8YX6BJsnymM17Rm2HKAiAd4t/mco+9FBcyK89JPOa1SLFMd4HMq5lklYA7tiJ1Qg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","_shasum":"d501c1c083a54598aabefd965a26c5b625483024","authors":["Max Wheeler <max@icelab.com.au> (https://github.com/makenosound)"],"gitHead":"df42719c49a386462012f55128e3900a98d3ca66","scripts":{"lint":"eslint 'src/*.js' 'src/**/*.js'; exit 0","test":"NODE_ENV=test babel-node test | faucet","build":"babel src --out-dir lib","clean":"rm -rf ./lib/*","compile":"npm run build","posttest":"npm run lint","precompile":"npm run clean","prepublish":"npm run compile"},"_npmUser":{"name":"textio","email":"admin@textio.com"},"repository":{"url":"git+https://github.com/icelab/draft-js-single-line-plugin.git","type":"git"},"_npmVersion":"3.10.3","description":"Restrict a draft-js editor to a single line of input.","directories":{},"_nodeVersion":"6.6.0","dependencies":{"immutable":"3.8.1"},"devDependencies":{"tape":"4.5.1","eslint":"2.8.0","faucet":"0.0.1","babel-cli":"6.7.5","is-function":"1.0.1","babel-preset-es2015":"6.6.0","eslint-plugin-promise":"1.3.1","eslint-config-standard":"5.1.0","eslint-plugin-standard":"1.3.2"},"peerDependencies":{"react":">=15.0.0","draft-js":"*","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/textio-draft-js-single-line-plugin-0.0.6.tgz_1486016769350_0.9134420913178474","host":"packages-12-west.internal.npmjs.com"}}},"time":{"created":"2016-11-22T21:18:33.829Z","modified":"2026-07-02T17:22:05.959Z","0.0.2":"2016-11-22T21:18:33.829Z","0.0.3":"2016-11-22T21:20:44.418Z","0.0.4":"2016-11-22T21:28:12.660Z","0.0.5":"2017-02-02T05:52:05.805Z","0.0.6":"2017-02-02T06:26:09.587Z"},"bugs":{"url":"https://github.com/icelab/draft-js-single-line-plugin/issues"},"license":"MIT","homepage":"https://github.com/icelab/draft-js-single-line-plugin","keywords":["draft-js","draft-js-plugins","plugins","plugin"],"repository":{"url":"git+https://github.com/icelab/draft-js-single-line-plugin.git","type":"git"},"description":"Restrict a draft-js editor to a single line of input.","maintainers":[{"email":"admin@textio.com","name":"textio-circle"},{"email":"jensen@textio.com","name":"jensen_textio"},{"email":"bobby@textio.com","name":"bobby_textio"},{"email":"olivia@textio.com","name":"oliviagunton"},{"email":"mattie@textio.com","name":"mattiejean"},{"email":"brad@textio.com","name":"brad2"},{"email":"gregory@textio.com","name":"textio-greg"},{"email":"colin@textio.com","name":"colinjeanne-textio"}],"readme":"# Draft.js Single Line plugin\n\n*This is a plugin for the [`draft-js-plugins-editor`](https://www.draft-js-plugins.com/), a plugin system that sits on top of Draft.js.*\n\nThis plugin adds support restricting [Facebook’s Draft.js editor](https://facebook.github.io/draft-js/) to a single line of content. It will condense any blocks into a single block, and (optionally) strip any rich entities.\n\n## What, why?!\n\nMadness I know, however there places you want to allow _some_ rich styling yet the underlying value should still be a single line. Allowing titles for things like blog posts or pages to contain strong/emphasis is our main use-case.\n\n## Usage\n\n```js\nimport createSingleLinePlugin from 'draft-js-single-line-plugin'\nconst singleLinePlugin = createSingleLinePlugin()\n```\n\nThis can then be passed into a `draft-js-plugins-editor` component:\n\n```js\nimport createSingleLinePlugin from 'draft-js-single-line-plugin'\nconst singleLinePlugin = createSingleLinePlugin()\nimport Editor from 'draft-js-plugins-editor'\n\nconst plugins = [singleLinePlugin]\n\n<Editor plugins={plugins}\n    blockRenderMap={singleLinePlugin.blockRenderMap} />\n```\n\nThe plugin export a custom `blockRenderMap` that overrides the draft-js defaults and restricts the editor from rendering anything _except_ an `unstyled` block. You’ll need to manually pass it as above as the `draft-js-plugins-editor` doesn’t yet support this.\n\n## Options\n\nYou can pass options to the plugin as you call it:\n\n```js\nconst options = {\n  stripEntities: false\n}\nconst singleLinePlugin = createSingleLinePlugin(options)\n```\n\nThere’s only one option so far: `stripEntities: true/false`.\n\n## Developing\n\n```\nnpm install\nnpm install react react-dom draft-js\nnpm run test\n```\n","readmeFilename":"README.md"}