@@ -31,7 +31,7 @@ npm start
31
31
Function to creates an empty EditorState leveraging the decorators of the provided plugins.
32
32
33
33
Usage:
34
- ```
34
+ ``` js
35
35
import { createEmpty } from ' draft-js-plugin-editor' ;
36
36
37
37
const editorState = createEmpty (plugins);
@@ -42,7 +42,7 @@ const editorState = createEmpty(plugins);
42
42
Function to creates an EditorState with some text.
43
43
44
44
Usage:
45
- ```
45
+ ``` js
46
46
import { createWithText } from ' draft-js-plugin-editor' ;
47
47
48
48
const editorState = createWithText (' Hello World!' , plugins);
@@ -53,7 +53,7 @@ const editorState = createWithText('Hello World!', plugins);
53
53
Function to creates an EditorState with provided pre-used data.
54
54
55
55
Usage:
56
- ```
56
+ ``` js
57
57
import { createWithContent } from ' draft-js-plugin-editor' ;
58
58
59
59
const editorState = createWithContent (content, plugins);
@@ -71,7 +71,7 @@ An editor component accepting plugins.
71
71
| all other props accepted by the DraftJS Editor | [ see here] ( https://facebook.github.io/draft-js/docs/api-reference-editor.html#props ) | |
72
72
73
73
Usage:
74
- ```
74
+ ``` js
75
75
import React , { Component } from ' react' ;
76
76
import Editor , { createEmpty } from ' draft-js-plugin-editor' ;
77
77
import hashtagPlugin from ' draft-js-hashtag-plugin' ;
@@ -119,7 +119,7 @@ The Sticker Plugin allows users to place ContentBlocks of the type `sticker`.
119
119
120
120
Usage:
121
121
122
- ```
122
+ ``` js
123
123
import stickerPlugin from ' draft-js-sticker-plugin' ;
124
124
125
125
const stickerPluginInstance = stickerPlugin ({ stickers });
@@ -139,7 +139,7 @@ const { StickerSelect } = stickerPluginInstance;
139
139
140
140
The Hashtag Plugin allows users to write Hashtags which are styled in a different color.
141
141
142
- ```
142
+ ``` js
143
143
import hashtagPlugin from ' draft-js-hashtag-plugin' ;
144
144
145
145
const hashtagPluginInstance = hashtagPlugin ();
@@ -149,7 +149,7 @@ const hashtagPluginInstance = hashtagPlugin();
149
149
150
150
The Linkify Plugin wraps every link in an Anchor-Tag which then is clickable in the ` readOnly ` mode.
151
151
152
- ```
152
+ ``` js
153
153
import linkifyPlugin from ' draft-js-linkify-plugin' ;
154
154
155
155
const linkifyPluginInstance = linkifyPlugin ();
0 commit comments