jodit-react 5.2.40 → 5.3.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/build/esm/index.d.mts +24 -0
- package/build/esm/index.mjs +125 -0
- package/build/react-jodit.js +2 -0
- package/build/types/JoditEditor.js +1 -0
- package/build/types/include.jodit.d.ts +1 -1
- package/package.json +55 -36
- package/.nvmrc +0 -1
- package/CHANGELOG.md +0 -98
- package/SECURITY.md +0 -10
- package/build/jodit-react.js +0 -2
- package/examples/app.css +0 -185
- package/examples/app.tsx +0 -17
- package/examples/components/Form.css +0 -5
- package/examples/components/Form.tsx +0 -148
- package/examples/index.html +0 -66
- package/index.d.ts +0 -4
- package/src/JoditEditor.tsx +0 -165
- package/src/include.jodit.ts +0 -7
- package/src/index.ts +0 -5
- package/tsconfig.json +0 -20
- /package/build/{jodit-react.js.LICENSE.txt → react-jodit.js.LICENSE.txt} +0 -0
|
@@ -5,6 +5,7 @@ function usePrevious(value) {
|
|
|
5
5
|
useEffect(() => {
|
|
6
6
|
ref.current = value;
|
|
7
7
|
}, [value]);
|
|
8
|
+
// eslint-disable-next-line react-hooks/refs
|
|
8
9
|
return ref.current;
|
|
9
10
|
}
|
|
10
11
|
const JoditEditor = forwardRef(({ JoditConstructor = Jodit, className, config, id, name, onBlur, onChange, tabIndex, value, editorRef }, ref) => {
|
package/package.json
CHANGED
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jodit-react",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.1",
|
|
4
4
|
"description": "Jodit is awesome and usefully wysiwyg editor with filebrowser",
|
|
5
5
|
"main": "build/jodit-react.js",
|
|
6
|
+
"module": "./build/esm/index.mjs",
|
|
7
|
+
"types": "./build/types/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./build/esm/index.d.mts",
|
|
12
|
+
"default": "./build/esm/index.mjs"
|
|
13
|
+
},
|
|
14
|
+
"require": {
|
|
15
|
+
"types": "./build/types/index.d.ts",
|
|
16
|
+
"default": "./build/react-jodit.js"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"build"
|
|
22
|
+
],
|
|
6
23
|
"author": "Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)",
|
|
7
24
|
"keywords": [
|
|
8
25
|
"react",
|
|
@@ -16,61 +33,63 @@
|
|
|
16
33
|
"rte"
|
|
17
34
|
],
|
|
18
35
|
"dependencies": {
|
|
19
|
-
"jodit": "^4.8.
|
|
36
|
+
"jodit": "^4.8.3"
|
|
20
37
|
},
|
|
21
38
|
"peerDependencies": {
|
|
22
39
|
"react": "~0.14 || ^15 || ^16 || ^17 || ^18 || ^19",
|
|
23
40
|
"react-dom": "~0.14 || ^15 || ^16 || ^17 || ^18 || ^19"
|
|
24
41
|
},
|
|
25
42
|
"devDependencies": {
|
|
26
|
-
"@eslint/compat": "^
|
|
27
|
-
"@
|
|
28
|
-
"@swc
|
|
29
|
-
"@
|
|
30
|
-
"@testing-library/
|
|
31
|
-
"@testing-library/
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"eslint": "
|
|
40
|
-
"eslint-
|
|
41
|
-
"eslint-plugin-
|
|
42
|
-
"eslint-plugin-
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"react": "^19.0.0",
|
|
49
|
-
"react-dom": "^19.0.0",
|
|
43
|
+
"@eslint/compat": "^2.0.2",
|
|
44
|
+
"@swc-node/register": "^1.11.1",
|
|
45
|
+
"@swc/core": "^1.15.11",
|
|
46
|
+
"@testing-library/dom": "^10.4.1",
|
|
47
|
+
"@testing-library/react": "^16.3.2",
|
|
48
|
+
"@testing-library/user-event": "^14.6.1",
|
|
49
|
+
"@types/react": "^19.2.10",
|
|
50
|
+
"@types/react-dom": "^19.2.3",
|
|
51
|
+
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
|
52
|
+
"cross-env": "^10.1.0",
|
|
53
|
+
"css-loader": "^7.1.3",
|
|
54
|
+
"eslint": "9.39.2",
|
|
55
|
+
"eslint-config-prettier": "^10.1.8",
|
|
56
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
57
|
+
"eslint-plugin-react": "^7.37.5",
|
|
58
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
59
|
+
"eslint-plugin-vitest": "^0.5.4",
|
|
60
|
+
"html-webpack-plugin": "^5.6.6",
|
|
61
|
+
"jsdom": "^27.4.0",
|
|
62
|
+
"prettier": "^3.8.1",
|
|
63
|
+
"react": "^19.2.4",
|
|
64
|
+
"react-dom": "^19.2.4",
|
|
50
65
|
"replace": "^1.2.2",
|
|
51
66
|
"style-loader": "^4.0.0",
|
|
52
|
-
"swc-loader": "^0.2.
|
|
53
|
-
"ts-jest": "^29.2.5",
|
|
67
|
+
"swc-loader": "^0.2.7",
|
|
54
68
|
"ts-node": "^10.9.2",
|
|
55
|
-
"
|
|
56
|
-
"
|
|
69
|
+
"tsup": "^8.5.1",
|
|
70
|
+
"typescript": "^5.9.3",
|
|
71
|
+
"vitest": "^4.0.18",
|
|
72
|
+
"webpack": "^5.104.1",
|
|
57
73
|
"webpack-cli": "^6.0.1",
|
|
58
|
-
"webpack-dev-server": "^5.2.
|
|
74
|
+
"webpack-dev-server": "^5.2.3"
|
|
59
75
|
},
|
|
60
76
|
"scripts": {
|
|
61
77
|
"newversion": "npm version patch --no-git-tag-version && npm run github",
|
|
62
78
|
"lint": "npm run lint:ts && npm run lint:eslint",
|
|
63
79
|
"lint:ts": "tsc --noEmit",
|
|
64
80
|
"lint:eslint": "eslint ./",
|
|
65
|
-
"demo": "NODE_ENV=development node -r @swc-node/register ./node_modules/.bin/webpack serve --
|
|
81
|
+
"demo": "cross-env NODE_ENV=development node -r @swc-node/register ./node_modules/.bin/webpack serve --mode development",
|
|
66
82
|
"start": "npm run demo",
|
|
67
|
-
"build": "npm run build:react && npm run build:types",
|
|
68
|
-
"build:react": "NODE_ENV=production node -r @swc-node/register ./node_modules/.bin/webpack --mode production",
|
|
83
|
+
"build": "npm run build:react && npm run build:types && npm run build:esm",
|
|
84
|
+
"build:react": "cross-env NODE_ENV=production node -r @swc-node/register ./node_modules/.bin/webpack --mode production",
|
|
69
85
|
"build:types": "rm -rf ./build/types && tsc --project tsconfig.types.json && npm run remove-css",
|
|
70
|
-
"
|
|
86
|
+
"build:esm": "tsup src/index.ts --dts --format esm -d ./build/esm --clean",
|
|
87
|
+
"remove-css": "replace \"import '[^']+.css';\" ''./build/**/*.ts",
|
|
71
88
|
"github": "npm run git && git push --tags origin HEAD:main",
|
|
72
89
|
"git": "git add --all && git commit -m \"New version $npm_package_version. Read more https://github.com/jodit/jodit-react/releases/tag/$npm_package_version \" && git tag $npm_package_version",
|
|
73
|
-
"test": "
|
|
90
|
+
"test": "vitest run",
|
|
91
|
+
"test:watch": "vitest",
|
|
92
|
+
"webpack": "./node_modules/.bin/webpack --config ./webpack.config.ts --mode production"
|
|
74
93
|
},
|
|
75
94
|
"repository": {
|
|
76
95
|
"type": "git",
|
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
20
|
package/CHANGELOG.md
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
> **Tags:**
|
|
4
|
-
>
|
|
5
|
-
> - :boom: [Breaking Change]
|
|
6
|
-
> - :rocket: [New Feature]
|
|
7
|
-
> - :bug: [Bug Fix]
|
|
8
|
-
> - :memo: [Documentation]
|
|
9
|
-
> - :house: [Internal]
|
|
10
|
-
> - :nail_care: [Polish]
|
|
11
|
-
|
|
12
|
-
## 5.0.9
|
|
13
|
-
|
|
14
|
-
- Fixed ref forwarding issue
|
|
15
|
-
|
|
16
|
-
## 5.0.7
|
|
17
|
-
|
|
18
|
-
- [Fix: Avoid "Abort async" error by utilizing waitForReady API in Jodit destruct handling #287](https://github.com/jodit/jodit-react/pull/287)
|
|
19
|
-
- Fixed Config type issue
|
|
20
|
-
- Support React 19
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
## 4.0.1
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
## 1.3.19
|
|
28
|
-
|
|
29
|
-
#### :rocket: New Feature
|
|
30
|
-
|
|
31
|
-
- The package now re-exports imperative Jodit, so you can write plugins and use all Jodit helpers
|
|
32
|
-
|
|
33
|
-
```js
|
|
34
|
-
import JoditEditor, { Jodit } from '../../src/';
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* @param {Jodit} jodit
|
|
38
|
-
*/
|
|
39
|
-
function preparePaste(jodit) {
|
|
40
|
-
jodit.e.on(
|
|
41
|
-
'paste',
|
|
42
|
-
e => {
|
|
43
|
-
if (confirm('Change pasted content?')) {
|
|
44
|
-
jodit.e.stopPropagation('paste');
|
|
45
|
-
jodit.s.insertHTML(
|
|
46
|
-
Jodit.modules.Helpers.getDataTransfer(e)
|
|
47
|
-
.getData(Jodit.constants.TEXT_HTML)
|
|
48
|
-
.replace(/a/g, 'b')
|
|
49
|
-
);
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
{ top: true }
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
Jodit.plugins.add('preparePaste', preparePaste);
|
|
57
|
-
|
|
58
|
-
//...
|
|
59
|
-
return <JoditEditor />;
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
#### :house: Internal
|
|
63
|
-
|
|
64
|
-
- Update
|
|
65
|
-
|
|
66
|
-
```
|
|
67
|
-
eslint-plugin-react-hooks ^4.5.0 → ^4.6.0
|
|
68
|
-
@babel/core ^7.16.0 → ^7.19.0
|
|
69
|
-
@babel/eslint-parser ^7.17.0 → ^7.18.9
|
|
70
|
-
@babel/preset-env ^7.16.0 → ^7.19.0
|
|
71
|
-
@babel/preset-react ^7.16.0 → ^7.18.6
|
|
72
|
-
@types/react ^16.14.2 → ^18.0.18
|
|
73
|
-
babel-loader ^8.2.2 → ^8.2.5
|
|
74
|
-
css-loader ^3.6.0 → ^6.7.1
|
|
75
|
-
eslint ^8.9.0 → ^8.23.0
|
|
76
|
-
eslint-config-prettier ^8.4.0 → ^8.5.0
|
|
77
|
-
eslint-plugin-prettier ^4.0.0 → ^4.2.1
|
|
78
|
-
eslint-plugin-react ^7.28.0 → ^7.31.8
|
|
79
|
-
husky ^7.0.4 → ^8.0.1
|
|
80
|
-
lint-staged ^12.3.4 → ^13.0.3
|
|
81
|
-
prettier ^2.5.1 → ^2.7.1
|
|
82
|
-
style-loader ^0.20.3 → ^3.3.1
|
|
83
|
-
webpack ^4.44.2 → ^5.74.0
|
|
84
|
-
webpack-cli ^3.3.12 → ^4.10.0
|
|
85
|
-
webpack-dev-server ^3.11.0 → ^4.11.0
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## 1.3.18
|
|
89
|
-
|
|
90
|
-
#### :bug: Bug Fix
|
|
91
|
-
|
|
92
|
-
- [Jodit not cleaning up after unmount #196](https://github.com/jodit/jodit-react/issues/196)
|
|
93
|
-
|
|
94
|
-
## 1.2.1
|
|
95
|
-
|
|
96
|
-
#### :bug: Bug Fix
|
|
97
|
-
|
|
98
|
-
- [Editor duplicates after re-render (state change) #172](https://github.com/jodit/jodit-react/issues/172)
|
package/SECURITY.md
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Reporting security issues
|
|
2
|
-
|
|
3
|
-
If you believe you have found a security issue in the Jodit software, please contact us immediately.
|
|
4
|
-
|
|
5
|
-
When reporting a suspected security problem, please bear this in mind:
|
|
6
|
-
|
|
7
|
-
* Make sure to provide as many details as possible about the vulnerability.
|
|
8
|
-
* Please do not disclose publicly any security issues until we fix them and publish security releases.
|
|
9
|
-
|
|
10
|
-
Contact the security team at security@xdsoft.net. As soon as we receive the security report, we'll work promptly to confirm the issue and then to provide a security fix.
|