@@ -12,7 +12,7 @@ npm install @jimmycode/draft-js-select-image-plugin
12
12
This plugin exposes a button that integrates with the side toolbar.
13
13
14
14
``` js
15
- import createSelectImagePlugin from ' draft-js-select-image-plugin' ;
15
+ import createSelectImagePlugin from ' @jimmycode/ draft-js-select-image-plugin' ;
16
16
const selectImagePlugin = createSelectImagePlugin ({});
17
17
const { SelectImageButton } = selectImagePlugin;
18
18
```
@@ -25,6 +25,10 @@ const { SelectImageButton } = selectImagePlugin;
25
25
## Integration
26
26
Rendering the image is out of scope, but in the following example you can see how to integrate ` draft-js-image-plugin ` .
27
27
28
+ ```
29
+ npm install draft-js-image-plugin
30
+ ```
31
+
28
32
``` js
29
33
import React from ' react' ;
30
34
import ReactDOM from ' react-dom' ;
@@ -33,10 +37,11 @@ import Editor from 'draft-js-plugins-editor';
33
37
import { EditorState } from ' draft-js' ;
34
38
import createSideToolbarPlugin from ' draft-js-side-toolbar-plugin' ;
35
39
import BlockTypeSelect from ' draft-js-side-toolbar-plugin/lib/components/BlockTypeSelect' ;
36
-
37
40
import createImagePlugin from ' draft-js-image-plugin' ;
38
- import createSelectImagePlugin from ' draft-js-select-image-plugin' ;
41
+ import createSelectImagePlugin from ' @jimmycode/draft-js-select-image-plugin' ;
42
+
39
43
import ' draft-js-side-toolbar-plugin/lib/plugin.css' ;
44
+ import ' draft-js-image-plugin/lib/plugin.css' ;
40
45
41
46
const imagePlugin = createImagePlugin ();
42
47
const selectImagePlugin = createSelectImagePlugin ();
0 commit comments