@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 ADDED
@@ -0,0 +1,3 @@
1
+ # Jodit License PRO
2
+
3
+ [About License](https://xdsoft.net/jodit/pro/)
package/README.md CHANGED
@@ -1,3 +1,63 @@
1
- # Temporary Holding Version
1
+ # React Jodit PRO WYSIWYG Editor
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![npm](https://img.shields.io/npm/v/jodit-pro-react.svg)](https://www.npmjs.com/package/jodit-pro-react)
4
+ [![npm](https://img.shields.io/npm/dm/jodit-pro-react.svg)](https://www.npmjs.com/package/jodit-pro-react)
5
+ [![npm](https://img.shields.io/npm/l/jodit-pro-react.svg)](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).