jodit-react 4.0.30 → 5.0.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.
@@ -10,11 +10,11 @@ jobs:
10
10
  newversion:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
- - uses: actions/checkout@v3
13
+ - uses: actions/checkout@v4
14
14
  with:
15
15
  persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
16
16
  fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
17
- - uses: actions/setup-node@v3 #Setup Node
17
+ - uses: actions/setup-node@v4 #Setup Node
18
18
  with:
19
19
  node-version-file: '.nvmrc'
20
20
  cache: 'npm'
@@ -13,8 +13,8 @@ jobs:
13
13
  runs-on: ubuntu-latest
14
14
 
15
15
  steps:
16
- - uses: actions/checkout@v3
17
- - uses: actions/setup-node@v3 #Setup Node
16
+ - uses: actions/checkout@v4
17
+ - uses: actions/setup-node@v4 #Setup Node
18
18
  with:
19
19
  node-version-file: '.nvmrc'
20
20
  cache: 'npm'
@@ -33,4 +33,4 @@ jobs:
33
33
 
34
34
  - name: Publish
35
35
  run: |
36
- NPM_TOKEN=${{ secrets.NPM_TOKEN }} npm publish ./ --access public
36
+ NPM_TOKEN=${{ secrets.NPM_TOKEN }} npm publish ./ --access public --tag beta
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 18.17.1
1
+ 20
package/README.md CHANGED
@@ -45,11 +45,10 @@ const Example = ({ placeholder }) => {
45
45
  const editor = useRef(null);
46
46
  const [content, setContent] = useState('');
47
47
 
48
- const config = useMemo(
49
- {
48
+ const config = useMemo(() => ({
50
49
  readonly: false, // all options from https://xdsoft.net/jodit/docs/,
51
50
  placeholder: placeholder || 'Start typings...'
52
- },
51
+ }),
53
52
  [placeholder]
54
53
  );
55
54
 
@@ -71,7 +70,7 @@ const Example = ({ placeholder }) => {
71
70
  You can use all Jodit features and write your [own plugin](https://xdsoft.net/jodit/docs/modules/plugin.html) for example.
72
71
 
73
72
  ```js
74
- import JoditEditor, { Jodit } from '../../src/';
73
+ import JoditEditor, { Jodit } from 'jodit-react';
75
74
 
76
75
  /**
77
76
  * @param {Jodit} jodit
@@ -96,9 +95,29 @@ function preparePaste(jodit) {
96
95
  Jodit.plugins.add('preparePaste', preparePaste);
97
96
 
98
97
  //...
99
- return <JoditEditor/>;
98
+ return <JoditEditor />;
99
+ ```
100
+
101
+ You can see how to write plugins [in the documentation](https://xdsoft.net/jodit/pro/docs/how-to/create-plugin.md) or [on the stand](https://xdsoft.net/jodit/pro/docs/getting-started/examples.md#jodit-example-paste-link)
102
+
103
+ ## Use with Jodit PRO
104
+
105
+ You can connect any Jodit constructor and set it as the `JoditConstructor` property of the component.
106
+
107
+ ```jsx
108
+ import React from 'react';
109
+ import JoditEditor from 'jodit-react';
110
+ import {Jodit} from 'jodit-pro';
111
+ import 'jodit-pro/es5/jodit.min.css';
112
+ // ...
113
+
114
+ function App() {
115
+ return <JoditEditor JoditConstructor={Jodit} />;
116
+ }
117
+
100
118
  ```
101
119
 
120
+
102
121
  ## License
103
122
 
104
123
  This package is available under `MIT` License.