@panneau/field-html 4.0.1 → 4.0.4
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/es/index.js +16 -12
- package/package.json +5 -5
package/es/index.js
CHANGED
|
@@ -2,9 +2,10 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
3
|
import { CKEditor } from '@ckeditor/ckeditor5-react';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
-
import
|
|
5
|
+
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
6
6
|
import InputGroup from '@panneau/field-input-group';
|
|
7
7
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
8
|
+
import { jsx } from 'react/jsx-runtime';
|
|
8
9
|
|
|
9
10
|
var useCKEditorBuilds = function useCKEditorBuilds() {
|
|
10
11
|
var _useState = useState(false),
|
|
@@ -124,17 +125,20 @@ function HtmlField(_ref) {
|
|
|
124
125
|
var finalCkConfig = _objectSpread(_objectSpread({}, ckConfig), {}, {
|
|
125
126
|
licenseKey: (ckConfig != null && typeof ckConfig.licenseKey !== 'undefined' ? ckConfig.licenseKey : null) || 'GPL'
|
|
126
127
|
});
|
|
127
|
-
var ckElement = EditorBuild !== null ? /*#__PURE__*/
|
|
128
|
-
className: finalClassName
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
128
|
+
var ckElement = EditorBuild !== null ? /*#__PURE__*/jsx("div", {
|
|
129
|
+
className: finalClassName,
|
|
130
|
+
children: /*#__PURE__*/jsx(CKEditor, _objectSpread(_objectSpread(_objectSpread({
|
|
131
|
+
editor: EditorBuild,
|
|
132
|
+
data: CKValue,
|
|
133
|
+
config: finalCkConfig,
|
|
134
|
+
onChange: onCkEditorChange
|
|
135
|
+
}, commonProps), ckOptions), {}, {
|
|
136
|
+
disabled: disabled
|
|
137
|
+
}))
|
|
138
|
+
}) : null;
|
|
139
|
+
return inline ? /*#__PURE__*/jsx(InputGroup, {
|
|
140
|
+
children: ckElement
|
|
141
|
+
}) : ckElement;
|
|
138
142
|
}
|
|
139
143
|
|
|
140
144
|
var definition = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/field-html",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
4
4
|
"description": "A HTML field, using either Quill or CK Editor",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"@ckeditor/ckeditor5-editor-multi-root": "^47.1.0",
|
|
63
63
|
"@ckeditor/ckeditor5-react": "^11.0.0",
|
|
64
64
|
"@panneau/ckeditor": "^4.0.0",
|
|
65
|
-
"@panneau/core": "^4.0.
|
|
66
|
-
"@panneau/field-input-group": "^4.0.
|
|
67
|
-
"@panneau/themes": "^4.0.
|
|
65
|
+
"@panneau/core": "^4.0.4",
|
|
66
|
+
"@panneau/field-input-group": "^4.0.4",
|
|
67
|
+
"@panneau/themes": "^4.0.4",
|
|
68
68
|
"classnames": "^2.5.1",
|
|
69
69
|
"prop-types": "^15.7.2"
|
|
70
70
|
},
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "e854451a718c6bc7dcde2b804c9913d8ac0297ff"
|
|
78
78
|
}
|