jodit-react 2.0.1-beta.6 → 4.0.2

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.
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.0.0-beta.61
4
+ * Version: v4.0.1
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Jodit } from 'jodit/types/jodit';
1
+ import type { Jodit } from 'jodit/esm/index';
2
2
  import * as React from 'react';
3
3
 
4
4
  type DeepPartial<T> = T extends object
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jodit-react",
3
- "version": "2.0.1-beta.6",
3
+ "version": "4.0.2",
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,47 +16,48 @@
16
16
  "rte"
17
17
  ],
18
18
  "dependencies": {
19
- "jodit": "^4.0.0-beta.61"
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
- "@typescript-eslint/eslint-plugin": "^5.57.0",
27
- "@typescript-eslint/parser": "^5.57.0",
28
- "@babel/core": "^7.21.3",
29
- "@babel/eslint-parser": "^7.21.3",
30
- "@babel/preset-env": "^7.20.2",
31
- "@babel/preset-react": "^7.18.6",
32
- "@types/react": "^18.0.31",
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.7.3",
38
- "eslint": "8.37.0",
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.0",
45
- "prettier": "^2.8.7",
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.2",
49
- "webpack": "^5.77.0",
50
- "webpack-cli": "^5.0.1",
51
- "webpack-dev-server": "^4.13.1"
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 run lint && npm update && rm -rf build/ && npm run build && npm version prerelease --preid=beta --no-git-tag-version && npm run github",
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",
58
58
  "build": "export NODE_ENV=production && webpack --mode production",
59
- "github": "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 && git push --tags origin HEAD:master"
59
+ "github": "npm run git && git push --tags origin HEAD:master",
60
+ "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"
60
61
  },
61
62
  "repository": {
62
63
  "type": "git",
@@ -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
-
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 name={name} id={id} ref={textArea} />
121
+ <textarea
122
+ defaultValue={value}
123
+ name={name}
124
+ id={id}
125
+ ref={textArea}
126
+ />
122
127
  </div>
123
128
  );
124
129
  }