jodit-react 1.3.26 → 1.3.28

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/index.d.ts CHANGED
@@ -1,14 +1,21 @@
1
- import * as React from "react";
2
- import { IJodit } from "jodit/types";
1
+ import { Jodit } from 'jodit/types/jodit';
2
+ import * as React from 'react';
3
3
 
4
- export interface JoditProps {
4
+ export interface IJoditEditorProps {
5
5
  value: string;
6
- onChange?: (value: string) => void;
7
- onBlur?: (value: string) => void;
8
- config?: IJodit['options'];
9
- }
10
6
 
11
- export default class JoditEditor extends React.Component<JoditProps, any> {
12
- constructor(props: JoditProps, context: any);
13
- render(): JSX.Element;
7
+ className?: string;
8
+
9
+ config?: Partial<Jodit['options']>;
10
+ // eslint-disable-next-line no-unused-vars
11
+ onChange?: (newValue: string) => void;
12
+ // eslint-disable-next-line no-unused-vars
13
+ onBlur?: (newValue: string) => void;
14
14
  }
15
+
16
+ declare const JoditEditor: React.ForwardRefExoticComponent<
17
+ React.PropsWithoutRef<IJoditEditorProps> & React.RefAttributes<Jodit>
18
+ >;
19
+
20
+ export default JoditEditor;
21
+ export { Jodit };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jodit-react",
3
- "version": "1.3.26",
3
+ "version": "1.3.28",
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",
@@ -1,24 +0,0 @@
1
- import * as React from 'react';
2
- import { IJodit } from 'jodit/types';
3
- import { Jodit } from 'jodit/types/jodit';
4
-
5
- declare module 'jodit-react' {
6
- export interface IJoditEditorProps {
7
- value: string;
8
-
9
- className?: string;
10
-
11
- config?: Partial<IJodit['options']>;
12
- // eslint-disable-next-line no-unused-vars
13
- onChange: (newValue: string) => void;
14
- // eslint-disable-next-line no-unused-vars
15
- onBlur: (newValue: string) => void;
16
- }
17
-
18
- const JoditEditor: React.ForwardRefExoticComponent<
19
- React.PropsWithoutRef<IJoditEditorProps> & React.RefAttributes<Jodit>
20
- >;
21
-
22
- export default JoditEditor;
23
- export { Jodit };
24
- }