@ohos-ports/jodit-pro-react 0.0.0-stage → 5.9.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +3 -0
- package/README.md +62 -2
- package/build/esm/JoditEditor.css +10531 -0
- package/build/esm/JoditEditor.d.mts +26 -0
- package/build/esm/JoditEditor.mjs +6 -0
- package/build/esm/chunk-HINFXUP4.mjs +62114 -0
- package/build/esm/index.css +10531 -0
- package/build/esm/index.d.mts +14 -0
- package/build/esm/index.mjs +18 -0
- package/build/jodit-react.js +2 -0
- package/build/jodit-react.js.LICENSE.txt +40 -0
- package/build/types/JoditEditor.d.ts +22 -0
- package/build/types/JoditEditor.js +101 -0
- package/build/types/include.jodit.d.ts +10 -0
- package/build/types/include.jodit.js +9 -0
- package/build/types/index.d.ts +10 -0
- package/build/types/index.js +9 -0
- package/package.json +85 -5
package/LICENSE.md
ADDED
package/README.md
CHANGED
|
@@ -1,3 +1,63 @@
|
|
|
1
|
-
#
|
|
1
|
+
# React Jodit PRO WYSIWYG Editor
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/jodit-pro-react)
|
|
4
|
+
[](https://www.npmjs.com/package/jodit-pro-react)
|
|
5
|
+
[](https://www.npmjs.com/package/jodit-pro-react)
|
|
6
|
+
|
|
7
|
+
React wrapper for [Jodit PRO](https://xdsoft.net/jodit/pro/)
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install jodit-pro-react --save
|
|
13
|
+
# or
|
|
14
|
+
yarn add jodit-pro-react
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Update editor version
|
|
18
|
+
```bash
|
|
19
|
+
npm update jodit-react-pro
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
### 1. Require and use Jodit-react component inside your application.
|
|
25
|
+
|
|
26
|
+
```jsx
|
|
27
|
+
import React, {useState, useRef} from 'react';
|
|
28
|
+
import JoditEditor from "jodit-pro-react";
|
|
29
|
+
|
|
30
|
+
const Example = ({}) => {
|
|
31
|
+
const editor = useRef(null)
|
|
32
|
+
const [content, setContent] = useState('')
|
|
33
|
+
|
|
34
|
+
const config = {
|
|
35
|
+
readonly: false, // all options from https://xdsoft.net/jodit/docs/,
|
|
36
|
+
uploader: {
|
|
37
|
+
url: 'https://xdsoft.net/jodit/finder/?action=fileUpload'
|
|
38
|
+
},
|
|
39
|
+
filebrowser: {
|
|
40
|
+
ajax: {
|
|
41
|
+
url: 'https://xdsoft.net/jodit/finder/'
|
|
42
|
+
},
|
|
43
|
+
height: 580,
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<JoditEditor
|
|
49
|
+
ref={editor}
|
|
50
|
+
value={content}
|
|
51
|
+
config={config}
|
|
52
|
+
tabIndex={1} // tabIndex of textarea
|
|
53
|
+
onBlur={newContent => setContent(newContent)} // preferred to use only this option to update the content for performance reasons
|
|
54
|
+
onChange={newContent => {}}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
License
|
|
62
|
+
-----
|
|
63
|
+
This package is available under [License](https://xdsoft.net/jodit/pro/license).
|