Skip to content

Commit

Permalink
Rename into draft-js-prism
Browse files Browse the repository at this point in the history
  • Loading branch information
SamyPesse committed May 31, 2016
1 parent 9ef60b8 commit a645e34
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# draftjs-prism
# draft-js-prism

[![NPM version](https://badge.fury.io/js/draftjs-prism.svg)](http://badge.fury.io/js/draftjs-prism)
[![NPM version](https://badge.fury.io/js/draft-js-prism.svg)](http://badge.fury.io/js/draft-js-prism)

`draftjs-prism` is a decorator for DraftJS to highlight code blocks using [Prism](https://github.com/PrismJS/prism).
`draft-js-prism` is a decorator for DraftJS to highlight code blocks using [Prism](https://github.com/PrismJS/prism).

![Prism](./preview.gif)

### Installation

```
$ npm install draftjs-prism
$ npm install draft-js-prism
```

### Usage

```js
var Draft = require('draft-js');
var PrismDecorator = require('draftjs-prism');
var PrismDecorator = require('draft-js-prism');

var decorator = new PrismDecorator();
var editorState = Draft.EditorState.createEmpty(decorator)
```

You'll also need to include the css for one of the [Prism themes](https://github.com/PrismJS/prism/tree/gh-pages/themes).

You can use this decorator combined with others by using [draftjs-multidecorators](https://github.com/SamyPesse/draftjs-multidecorators)
You can use this decorator combined with others by using [draft-js-multidecorators](https://github.com/SamyPesse/draft-js-multidecorators)

2 changes: 1 addition & 1 deletion demo/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class PrismEditorExample extends React.Component {
blocks: [
{
type: 'header-one',
text: 'Demo for draftjs-prism'
text: 'Demo for draft-js-prism'
},
{
type: 'unstyled',
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "draftjs-prism",
"name": "draft-js-prism",
"version": "1.0.2",
"description": "Code highlighting for DraftJS",
"main": "./lib/index.js",
Expand All @@ -13,17 +13,17 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/SamyPesse/draftjs-prism.git"
"url": "git+https://github.com/SamyPesse/draft-js-prism.git"
},
"keywords": [
"draftjs"
"draft-js"
],
"author": "Samy Pesse <[email protected]>",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/SamyPesse/draftjs-prism/issues"
"url": "https://github.com/SamyPesse/draft-js-prism/issues"
},
"homepage": "https://github.com/SamyPesse/draftjs-prism#readme",
"homepage": "https://github.com/SamyPesse/draft-js-prism#readme",
"dependencies": {
"extend": "^3.0.0",
"immutable": "*",
Expand Down

0 comments on commit a645e34

Please sign in to comment.