jodit-react 2.0.1-beta.9 → 4.0.3
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/.github/workflows/new-version.yml +2 -2
- package/.github/workflows/release.yml +1 -1
- package/.nvmrc +1 -1
- package/CHANGELOG.md +4 -0
- package/build/jodit-react.js +1 -1
- package/build/jodit-react.js.LICENSE.txt +1 -1
- package/index.d.ts +1 -1
- package/package.json +18 -18
- package/src/JoditEditor.js +7 -2
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jodit-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "Jodit is awesome and usefully wysiwyg editor with filebrowser",
|
|
5
5
|
"main": "build/jodit-react.js",
|
|
6
6
|
"author": "Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)s",
|
|
@@ -16,42 +16,42 @@
|
|
|
16
16
|
"rte"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"jodit": "^4.0.0
|
|
19
|
+
"jodit": "^4.0.0"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"react": "~0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0",
|
|
23
23
|
"react-dom": "~0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@
|
|
27
|
-
"@
|
|
28
|
-
"@babel/
|
|
29
|
-
"@babel/
|
|
30
|
-
"@
|
|
31
|
-
"@
|
|
32
|
-
"@
|
|
26
|
+
"@babel/core": "^7.22.5",
|
|
27
|
+
"@babel/eslint-parser": "^7.22.5",
|
|
28
|
+
"@babel/preset-env": "^7.22.5",
|
|
29
|
+
"@babel/preset-react": "^7.22.5",
|
|
30
|
+
"@types/react": "^18.2.14",
|
|
31
|
+
"@typescript-eslint/eslint-plugin": "^5.60.1",
|
|
32
|
+
"@typescript-eslint/parser": "^5.60.1",
|
|
33
33
|
"babel": "^6.23.0",
|
|
34
34
|
"babel-cli": "^6.26.0",
|
|
35
35
|
"babel-loader": "^9.1.2",
|
|
36
36
|
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
37
|
-
"css-loader": "^6.
|
|
38
|
-
"eslint": "8.
|
|
37
|
+
"css-loader": "^6.8.1",
|
|
38
|
+
"eslint": "8.43.0",
|
|
39
39
|
"eslint-config-prettier": "^8.8.0",
|
|
40
40
|
"eslint-plugin-prettier": "^4.2.1",
|
|
41
41
|
"eslint-plugin-react": "^7.32.2",
|
|
42
42
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
43
43
|
"husky": "^8.0.3",
|
|
44
|
-
"lint-staged": "^13.2.
|
|
45
|
-
"prettier": "^2.8.
|
|
44
|
+
"lint-staged": "^13.2.3",
|
|
45
|
+
"prettier": "^2.8.8",
|
|
46
46
|
"react": "^18.2.0",
|
|
47
47
|
"react-dom": "^18.2.0",
|
|
48
|
-
"style-loader": "^3.3.
|
|
49
|
-
"webpack": "^5.
|
|
50
|
-
"webpack-cli": "^5.
|
|
51
|
-
"webpack-dev-server": "^4.
|
|
48
|
+
"style-loader": "^3.3.3",
|
|
49
|
+
"webpack": "^5.88.1",
|
|
50
|
+
"webpack-cli": "^5.1.4",
|
|
51
|
+
"webpack-dev-server": "^4.15.1"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
|
-
"newversion": "npm
|
|
54
|
+
"newversion": "npm version patch --no-git-tag-version && npm run github",
|
|
55
55
|
"lint": "eslint ./",
|
|
56
56
|
"demo": "cd examples && export NODE_ENV=development && webpack serve --config ./webpack.config.js --mode development",
|
|
57
57
|
"start": "npm run demo",
|
package/src/JoditEditor.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useRef, forwardRef, useLayoutEffect } from 'react';
|
|
2
2
|
import { func, number, object, string } from 'prop-types';
|
|
3
3
|
import { Jodit } from './include.jodit';
|
|
4
|
+
|
|
4
5
|
const { isFunction } = Jodit.modules.Helpers;
|
|
5
6
|
|
|
6
7
|
function usePrevious(value) {
|
|
@@ -40,7 +41,6 @@ const JoditEditor = forwardRef(
|
|
|
40
41
|
|
|
41
42
|
useEffect(() => {
|
|
42
43
|
const element = textArea.current;
|
|
43
|
-
element.value = value || '';
|
|
44
44
|
const jodit = Jodit.make(element, config);
|
|
45
45
|
textArea.current = jodit;
|
|
46
46
|
|
|
@@ -118,7 +118,12 @@ const JoditEditor = forwardRef(
|
|
|
118
118
|
|
|
119
119
|
return (
|
|
120
120
|
<div className={'jodit-react-container'}>
|
|
121
|
-
<textarea
|
|
121
|
+
<textarea
|
|
122
|
+
defaultValue={value}
|
|
123
|
+
name={name}
|
|
124
|
+
id={id}
|
|
125
|
+
ref={textArea}
|
|
126
|
+
/>
|
|
122
127
|
</div>
|
|
123
128
|
);
|
|
124
129
|
}
|