Skip to content

Commit

Permalink
Major release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
albertomr86 committed Jun 11, 2018
1 parent 2785c13 commit 19c8197
Show file tree
Hide file tree
Showing 7 changed files with 2,391 additions and 2,399 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
access=public
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ npm install @jimmycode/draft-js-select-image-plugin
This plugin exposes a button that integrates with the side toolbar.

```js
import createSelectImagePlugin from 'draft-js-select-image-plugin';
import createSelectImagePlugin from '@jimmycode/draft-js-select-image-plugin';
const selectImagePlugin = createSelectImagePlugin({});
const { SelectImageButton } = selectImagePlugin;
```
Expand All @@ -25,6 +25,10 @@ const { SelectImageButton } = selectImagePlugin;
## Integration
Rendering the image is out of scope, but in the following example you can see how to integrate `draft-js-image-plugin`.

```
npm install draft-js-image-plugin
```

```js
import React from 'react';
import ReactDOM from 'react-dom';
Expand All @@ -33,10 +37,11 @@ import Editor from 'draft-js-plugins-editor';
import { EditorState } from 'draft-js';
import createSideToolbarPlugin from 'draft-js-side-toolbar-plugin';
import BlockTypeSelect from 'draft-js-side-toolbar-plugin/lib/components/BlockTypeSelect';

import createImagePlugin from 'draft-js-image-plugin';
import createSelectImagePlugin from 'draft-js-select-image-plugin';
import createSelectImagePlugin from '@jimmycode/draft-js-select-image-plugin';

import 'draft-js-side-toolbar-plugin/lib/plugin.css';
import 'draft-js-image-plugin/lib/plugin.css';

const imagePlugin = createImagePlugin();
const selectImagePlugin = createSelectImagePlugin();
Expand Down
Loading

0 comments on commit 19c8197

Please sign in to comment.