{"versions":{"1.0.6":{"name":"draft-js-prism","version":"1.0.6","description":"Code highlighting for DraftJS","main":"./lib/index.js","scripts":{"test":"mocha \"./lib/__tests__/*.js\" --bail --reporter=list","build":"browserify -t [ babelify --presets [ es2015 react ] ] ./demo/main.js > ./demo/dist.js; cp ./node_modules/prismjs/themes/prism.css ./demo/prism.css; cp ./node_modules/draft-js/dist/Draft.css ./demo/draft.css","deploy":"npm run build; gh-pages -d ./demo","watch":"watch 'npm run build' ./lib","serve":"http-server -p 9090 demo/","start":"npm run build; parallelshell 'npm run serve -s' 'npm run watch -s'"},"repository":{"type":"git","url":"git+https://github.com/SamyPesse/draft-js-prism.git"},"keywords":["draft-js"],"author":{"name":"Samy Pesse","email":"samypesse@gmail.com"},"license":"Apache-2.0","bugs":{"url":"https://github.com/SamyPesse/draft-js-prism/issues"},"homepage":"https://github.com/SamyPesse/draft-js-prism#readme","dependencies":{"extend":"^3.0.0","immutable":"*"},"peerDependencies":{"prismjs":"1.x"},"devDependencies":{"babel-preset-es2015":"^6.6.0","babel-preset-react":"^6.5.0","babelify":"^7.2.0","browserify":"^13.0.0","draft-js":"^0.7.0","expect":"^1.20.1","gh-pages":"^0.11.0","http-server":"^0.9.0","mocha":"^2.5.3","parallelshell":"2.0.0","prismjs":"1.x","react":"^15.1.0","react-dom":"^15.1.0","watch":"^0.18.0"},"gitHead":"2b7cfdf867fbe71164e33923ace0d8bc96a21ae7","_id":"draft-js-prism@1.0.6","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"anonymous","email":"npm@mxstbr.com"},"dist":{"shasum":"880c5e5ae1a161646cdacc7296a01bf48b0030b4","size":436758,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/draft-js-prism/-/draft-js-prism-1.0.6.tgz","integrity":"sha512-9iNPPr6/vaC9K60DtVes1JGDZ9uD0vZ7/8i6de5cZEzbftOj/ijIGplEV0dTFT/q8U+bY1uR1ikQevjRh2pEpQ=="},"maintainers":[{"name":"anonymous","email":"npm@mxstbr.com"},{"name":"anonymous","email":"samypesse@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/draft-js-prism-1.0.6.tgz_1517649101976_0.026554460171610117"},"directories":{},"publish_time":1517649103561,"_hasShrinkwrap":false,"_cnpm_publish_time":1517649103561,"_cnpmcore_publish_time":"2021-12-18T13:31:58.376Z","contributors":[]},"1.0.5":{"name":"draft-js-prism","version":"1.0.5","description":"Code highlighting for DraftJS","main":"./lib/index.js","scripts":{"test":"mocha \"./lib/__tests__/*.js\" --bail --reporter=list","build":"browserify -t [ babelify --presets [ es2015 react ] ] ./demo/main.js > ./demo/dist.js; cp ./node_modules/prismjs/themes/prism.css ./demo/prism.css; cp ./node_modules/draft-js/dist/Draft.css ./demo/draft.css","deploy":"npm run build; gh-pages -d ./demo","watch":"watch 'npm run build' ./lib","serve":"http-server -p 9090 demo/","start":"npm run build; parallelshell 'npm run serve -s' 'npm run watch -s'"},"repository":{"type":"git","url":"git+https://github.com/SamyPesse/draft-js-prism.git"},"keywords":["draft-js"],"author":{"name":"Samy Pesse","email":"samypesse@gmail.com"},"license":"Apache-2.0","bugs":{"url":"https://github.com/SamyPesse/draft-js-prism/issues"},"homepage":"https://github.com/SamyPesse/draft-js-prism#readme","dependencies":{"extend":"^3.0.0","immutable":"*"},"peerDependencies":{"prismjs":"1.x"},"devDependencies":{"babel-preset-es2015":"^6.6.0","babel-preset-react":"^6.5.0","babelify":"^7.2.0","browserify":"^13.0.0","draft-js":"^0.7.0","expect":"^1.20.1","gh-pages":"^0.11.0","http-server":"^0.9.0","mocha":"^2.5.3","parallelshell":"2.0.0","prismjs":"1.x","react":"^15.1.0","react-dom":"^15.1.0","watch":"^0.18.0"},"gitHead":"88af0f56a7d1c602865755b127333936b4125559","_id":"draft-js-prism@1.0.5","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"anonymous","email":"npm@mxstbr.com"},"dist":{"shasum":"c32aa9c31bfd7b8ad9eb889c62e88a2cd7c741bd","size":436212,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/draft-js-prism/-/draft-js-prism-1.0.5.tgz","integrity":"sha512-KGpwV7hb4BWbBb7WEyhQrUWNK0nc4AWvbDk4Evmcev7KrAvWsKeqjbp+5j0ki0EexFCJ9XwG7WnN5f2zZ/TybQ=="},"maintainers":[{"name":"anonymous","email":"npm@mxstbr.com"},{"name":"anonymous","email":"samypesse@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/draft-js-prism-1.0.5.tgz_1506509474559_0.7682297052815557"},"directories":{},"publish_time":1506509476060,"_hasShrinkwrap":false,"_cnpm_publish_time":1506509476060,"_cnpmcore_publish_time":"2021-12-18T13:31:59.502Z","contributors":[]},"1.0.4":{"name":"draft-js-prism","version":"1.0.4","description":"Code highlighting for DraftJS","main":"./lib/index.js","scripts":{"test":"mocha \"./lib/__tests__/*.js\" --bail --reporter=list","build":"browserify -t [ babelify --presets [ es2015 react ] ] ./demo/main.js > ./demo/dist.js; cp ./node_modules/prismjs/themes/prism.css ./demo/prism.css; cp ./node_modules/draft-js/dist/Draft.css ./demo/draft.css","deploy":"npm run build; gh-pages -d ./demo","watch":"watch 'npm run build' ./lib","serve":"http-server -p 9090 demo/","start":"npm run build; parallelshell 'npm run serve -s' 'npm run watch -s'"},"repository":{"type":"git","url":"git+https://github.com/SamyPesse/draft-js-prism.git"},"keywords":["draft-js"],"author":{"name":"Samy Pesse","email":"samypesse@gmail.com"},"license":"Apache-2.0","bugs":{"url":"https://github.com/SamyPesse/draft-js-prism/issues"},"homepage":"https://github.com/SamyPesse/draft-js-prism#readme","dependencies":{"extend":"^3.0.0","immutable":"*"},"peerDependencies":{"prismjs":"1.x"},"devDependencies":{"babel-preset-es2015":"^6.6.0","babel-preset-react":"^6.5.0","babelify":"^7.2.0","browserify":"^13.0.0","draft-js":"^0.7.0","expect":"^1.20.1","gh-pages":"^0.11.0","http-server":"^0.9.0","mocha":"^2.5.3","parallelshell":"2.0.0","prismjs":"1.x","react":"^15.1.0","react-dom":"^15.1.0","watch":"^0.18.0"},"gitHead":"024f4ac33ca7a769c80ee45cc0c38c4e350f6942","_id":"draft-js-prism@1.0.4","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"anonymous","email":"npm@mxstbr.com"},"dist":{"shasum":"36daef4d6e5fb1c5a088ebd6ffe7090d2e51801c","size":436063,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/draft-js-prism/-/draft-js-prism-1.0.4.tgz","integrity":"sha512-8mCFi4tX4mvWNVfk0ZZWsvXhAtjIMgK5OydF+0KkKrpWGfbwMhmxxe7x42hzcPyEmAK9VeXW77bjYcw/Euvl6Q=="},"maintainers":[{"name":"anonymous","email":"npm@mxstbr.com"},{"name":"anonymous","email":"samypesse@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/draft-js-prism-1.0.4.tgz_1506109954035_0.7076451934408396"},"directories":{},"publish_time":1506109955593,"_hasShrinkwrap":false,"_cnpm_publish_time":1506109955593,"_cnpmcore_publish_time":"2021-12-18T13:32:00.296Z","contributors":[]},"1.0.3":{"name":"draft-js-prism","version":"1.0.3","description":"Code highlighting for DraftJS","main":"./lib/index.js","scripts":{"test":"mocha \"./lib/__tests__/*.js\" --bail --reporter=list","build":"browserify -t [ babelify --presets [ es2015 react ] ] ./demo/main.js > ./demo/dist.js; cp ./node_modules/prismjs/themes/prism.css ./demo/prism.css; cp ./node_modules/draft-js/dist/Draft.css ./demo/draft.css","deploy":"npm run build; gh-pages -d ./demo","watch":"watch 'npm run build' ./lib","serve":"http-server -p 9090 demo/","start":"npm run build; parallelshell 'npm run serve -s' 'npm run watch -s'"},"repository":{"type":"git","url":"git+https://github.com/SamyPesse/draft-js-prism.git"},"keywords":["draft-js"],"author":{"name":"Samy Pesse","email":"samypesse@gmail.com"},"license":"Apache-2.0","bugs":{"url":"https://github.com/SamyPesse/draft-js-prism/issues"},"homepage":"https://github.com/SamyPesse/draft-js-prism#readme","dependencies":{"extend":"^3.0.0","immutable":"*","prismjs":"^1.5.0"},"devDependencies":{"babel-preset-es2015":"^6.6.0","babel-preset-react":"^6.5.0","babelify":"^7.2.0","browserify":"^13.0.0","draft-js":"^0.7.0","expect":"^1.20.1","gh-pages":"^0.11.0","http-server":"^0.9.0","mocha":"^2.5.3","parallelshell":"2.0.0","react":"^15.1.0","react-dom":"^15.1.0","watch":"^0.18.0"},"gitHead":"8789c835ef829c713c0e0e8ff90de233db53b40f","_id":"draft-js-prism@1.0.3","_shasum":"5dd79ac74f3cd89d788ae4bd1b3e731df3542c7a","_from":".","_npmVersion":"3.7.5","_nodeVersion":"5.1.0","_npmUser":{"name":"anonymous","email":"samypesse@gmail.com"},"dist":{"shasum":"5dd79ac74f3cd89d788ae4bd1b3e731df3542c7a","size":435978,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/draft-js-prism/-/draft-js-prism-1.0.3.tgz","integrity":"sha512-0CMNtJdSj0T1kewLi04pZxZexAJsqbPjPSlVIy+0YVQorqFFdEjpRG0HbHk5d/xbMfWvlTWTdVAmiaf48I1nOg=="},"maintainers":[{"name":"anonymous","email":"npm@mxstbr.com"},{"name":"anonymous","email":"samypesse@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/draft-js-prism-1.0.3.tgz_1465591172942_0.15164126665331423"},"directories":{},"publish_time":1465591175908,"_hasShrinkwrap":false,"_cnpm_publish_time":1465591175908,"_cnpmcore_publish_time":"2021-12-18T13:32:00.947Z","contributors":[]},"1.0.2":{"name":"draft-js-prism","version":"1.0.2","description":"Code highlighting for DraftJS","main":"./lib/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"browserify -t [ babelify --presets [ es2015 react ] ] ./demo/main.js > ./demo/dist.js; cp ./node_modules/prismjs/themes/prism.css ./demo/prism.css; cp ./node_modules/draft-js/dist/Draft.css ./demo/draft.css","deploy":"npm run build; gh-pages -d ./demo","watch":"watch 'npm run build' ./lib","serve":"http-server -p 9090 demo/","start":"npm run build; parallelshell 'npm run serve -s' 'npm run watch -s'"},"repository":{"type":"git","url":"git+https://github.com/SamyPesse/draft-js-prism.git"},"keywords":["draft-js"],"author":{"name":"Samy Pesse","email":"samypesse@gmail.com"},"license":"Apache-2.0","bugs":{"url":"https://github.com/SamyPesse/draft-js-prism/issues"},"homepage":"https://github.com/SamyPesse/draft-js-prism#readme","dependencies":{"extend":"^3.0.0","immutable":"*","prismjs":"^1.5.0"},"devDependencies":{"draft-js":"^0.7.0","react":"^15.1.0","react-dom":"^15.1.0","babel-preset-es2015":"^6.6.0","babel-preset-react":"^6.5.0","babelify":"^7.2.0","browserify":"^13.0.0","gh-pages":"^0.11.0","http-server":"^0.9.0","watch":"^0.18.0","parallelshell":"2.0.0"},"gitHead":"a645e3482820a6587280e273e32e5a0fe0c9218c","_id":"draft-js-prism@1.0.2","_shasum":"08342f3ecb4466e83c2649d07101db122b49327a","_from":".","_npmVersion":"3.7.5","_nodeVersion":"5.1.0","_npmUser":{"name":"anonymous","email":"samypesse@gmail.com"},"dist":{"shasum":"08342f3ecb4466e83c2649d07101db122b49327a","size":435529,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/draft-js-prism/-/draft-js-prism-1.0.2.tgz","integrity":"sha512-yf7WA4655OfK8m2Ha6BKVo/V4PE5cm1ElM0Ypa+9G4B404Rh8ZqiWc93u5IG0zfMFZQzE0pw1IseLJeBfgHlpA=="},"maintainers":[{"name":"anonymous","email":"npm@mxstbr.com"},{"name":"anonymous","email":"samypesse@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/draft-js-prism-1.0.2.tgz_1464710748256_0.07844913937151432"},"directories":{},"publish_time":1464710749184,"_hasShrinkwrap":false,"_cnpm_publish_time":1464710749184,"_cnpmcore_publish_time":"2021-12-18T13:32:01.514Z","contributors":[]}},"dist-tags":{"latest":"1.0.6"},"name":"draft-js-prism","time":{"created":"2022-01-26T21:16:37.398Z","modified":"2025-06-16T05:44:55.366Z","1.0.6":"2018-02-03T09:11:43.561Z","1.0.5":"2017-09-27T10:51:16.060Z","1.0.4":"2017-09-22T19:52:35.593Z","1.0.3":"2016-06-10T20:39:35.908Z","1.0.2":"2016-05-31T16:05:49.184Z"},"readme":"# draft-js-prism\n\n[![NPM version](https://badge.fury.io/js/draft-js-prism.svg)](http://badge.fury.io/js/draft-js-prism)\n[![Build Status](https://travis-ci.org/SamyPesse/draft-js-prism.svg?branch=master)](https://travis-ci.org/SamyPesse/draft-js-prism)\n\n`draft-js-prism` is a decorator for DraftJS to highlight code blocks using [Prism](https://github.com/PrismJS/prism). It only decorates code blocks with syntax highlighting, if you're interested in providing a correct edition UX for code blocks, take a look at [draft-js-code](https://github.com/SamyPesse/draft-js-code).\n\n![Prism](./preview.gif)\n\n### Installation\n\n```\n$ npm install draft-js-prism prismjs\n```\n\n### Usage\n\n```js\nvar Draft = require('draft-js');\nvar PrismDecorator = require('draft-js-prism');\nvar Prism = require('prismjs')\n\nvar decorator = new PrismDecorator({\n  // Provide your own instance of PrismJS\n  prism: Prism,\n});\nvar editorState = Draft.EditorState.createEmpty(decorator)\n```\n\nYou'll also need to include the css for one of the [Prism themes](https://github.com/PrismJS/prism/tree/gh-pages/themes).\n\nYou can use this decorator combined with others by using [draft-js-multidecorators](https://github.com/SamyPesse/draft-js-multidecorators)","users":{}}