tp-react-elements-dev 1.7.1 → 1.7.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.
- package/dist/index.esm.js +4 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -52349,6 +52349,7 @@ var JoditEditor = /*@__PURE__*/getDefaultExportFromCjs(joditReactExports);
|
|
|
52349
52349
|
const RichTextEditor = ({ props }) => {
|
|
52350
52350
|
const editor = useRef(null);
|
|
52351
52351
|
const [content, setContent] = useState("");
|
|
52352
|
+
const value = props.getValues(props.item.name);
|
|
52352
52353
|
const config = Object.assign({ readonly: false, placeholder: "Start typing...", removeButtons: props.item.removeButtons, style: {
|
|
52353
52354
|
'font-family': 'Arial', // Default font is Arial
|
|
52354
52355
|
}, controls: {
|
|
@@ -52375,6 +52376,9 @@ const RichTextEditor = ({ props }) => {
|
|
|
52375
52376
|
}
|
|
52376
52377
|
props.item.onBlurFn && props.item.onBlurFn(newContent);
|
|
52377
52378
|
};
|
|
52379
|
+
useEffect(() => {
|
|
52380
|
+
setContent(value);
|
|
52381
|
+
}, [value]);
|
|
52378
52382
|
const handleChange = (newContent) => {
|
|
52379
52383
|
console.log(newContent, 'newContent Editor');
|
|
52380
52384
|
};
|