@apexcura/ui-components 0.0.15-Beta80 → 0.0.15-Beta81

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.js CHANGED
@@ -328,6 +328,14 @@ var import_tinymce_react = require("@tinymce/tinymce-react");
328
328
  var import_react9 = __toESM(require("react"));
329
329
  var CkEditor = (props) => {
330
330
  const editorRef = (0, import_react8.useRef)(null);
331
+ const onHandleChange = () => {
332
+ if (editorRef.current) {
333
+ let content = editorRef.current.getContent();
334
+ if (props.onChange) {
335
+ props.onChange(content);
336
+ }
337
+ }
338
+ };
331
339
  return /* @__PURE__ */ import_react9.default.createElement("div", null, /* @__PURE__ */ import_react9.default.createElement(
332
340
  import_tinymce_react.Editor,
333
341
  {
@@ -362,10 +370,7 @@ var CkEditor = (props) => {
362
370
  toolbar: "undo redo | blocks | bold italic forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help",
363
371
  content_style: "body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"
364
372
  },
365
- onChange: (event, editor) => {
366
- const data = editor.getData();
367
- props.onChange && props.onChange(data);
368
- }
373
+ onChange: onHandleChange
369
374
  }
370
375
  ));
371
376
  };
package/dist/index.mjs CHANGED
@@ -258,6 +258,14 @@ import { Editor } from "@tinymce/tinymce-react";
258
258
  import React8 from "react";
259
259
  var CkEditor = (props) => {
260
260
  const editorRef = useRef(null);
261
+ const onHandleChange = () => {
262
+ if (editorRef.current) {
263
+ let content = editorRef.current.getContent();
264
+ if (props.onChange) {
265
+ props.onChange(content);
266
+ }
267
+ }
268
+ };
261
269
  return /* @__PURE__ */ React8.createElement("div", null, /* @__PURE__ */ React8.createElement(
262
270
  Editor,
263
271
  {
@@ -292,10 +300,7 @@ var CkEditor = (props) => {
292
300
  toolbar: "undo redo | blocks | bold italic forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help",
293
301
  content_style: "body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"
294
302
  },
295
- onChange: (event, editor) => {
296
- const data = editor.getData();
297
- props.onChange && props.onChange(data);
298
- }
303
+ onChange: onHandleChange
299
304
  }
300
305
  ));
301
306
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.15-Beta80",
3
+ "version": "0.0.15-Beta81",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",