You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 31, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: packages/core/README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ import {
20
20
21
21
### Usage
22
22
23
-
`EditorContainer` contains all props for the draft js Editor which it passes down to plugins and the `Editor` via the React context api.
23
+
`EditorContainer` contains all props for the draft js Editor which it passes down to plugins and the `Editor` via the [React context api](https://reactjs.org/docs/context.html).
24
24
25
25
```js
26
26
import { EditorContainer } from'@djsp/core'
@@ -38,6 +38,7 @@ Here are the props that `EditorContainer` accepts, all of the below props are in
38
38
| - | - | - | - |
39
39
|`editorState`|`EditorState`| required | The state of the editor. Identical to the [draft js editorState prop](https://draftjs.org/docs/api-reference-editor#editorstate)|
40
40
|`onChange`|`(EditorState) => void`| required | Fired when content changes. Identical to the [draft js onChange prop](https://draftjs.org/docs/api-reference-editor#onchange)|
41
+
|`editorKey`|`string`| optional | Overrides [props set via plugin](#setEditorProps)|
41
42
|`textAlignment`|`"left" or "center" or "right"`| optional | Overrides [props set via plugin](#setEditorProps)|
42
43
|`textDirectionality`|`"LTR" or "RTL"`| optional | Overrides [props set via plugin](#setEditorProps)|
43
44
|`placeholder`|`string`| optional | Overrides [props set via plugin](#setEditorProps)|
@@ -139,7 +140,7 @@ The `Plugin` also accepts an optional render prop which exposes the plugin conte
139
140
| - | - | - |
140
141
|`editorState`|`EditorState`| The `EditorState` object |
141
142
|`setEditorState`|`(editorState: EditorState) => void`| Lets you update the editorState |
142
-
|`editorProps`|`Object`| Contains props that can be set via `setEditorProps`, these are `editorKey``placeholder``textAlignment``textDirectionality``readOnly``spellCheck``stripPastedStyles``tabIndex``autoCapitalize``autoComplete``autoCorrect``ariaActiveDescendantID``ariaAutoComplete``ariaControls``ariaDescribedBy``ariaExpanded``ariaLabel``ariaLabelledBy``ariaMultiline``webDriverTestID`|
143
+
|`editorProps`|`Object`| Contains the [props for `EditorContainer`](#props) except `editorState` and `onChange`|
143
144
|`setEditorProps`|`(editorProps: Object) => void`| lets you set the above editorProps. Be aware that editor props set via Plugins are overridden by `EditorContainer` props |
144
145
|`editorRef`|`Ref<DraftEditor>`| A React reference to the draft js editor |
0 commit comments