@visns-studio/visns-components 3.1.9 → 3.1.11
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/components/cms/Field.jsx +39 -18
- package/components/crm/Field.jsx +0 -1
- package/package.json +3 -2
package/components/cms/Field.jsx
CHANGED
|
@@ -2,6 +2,7 @@ import React, { useState, useEffect, useRef } from 'react';
|
|
|
2
2
|
import DatePicker from 'react-datepicker';
|
|
3
3
|
import _ from 'lodash';
|
|
4
4
|
import ReactQuill, { Quill } from 'react-quill';
|
|
5
|
+
import { Editor } from '@tinymce/tinymce-react';
|
|
5
6
|
import ImageUploader from 'quill-image-uploader';
|
|
6
7
|
import Toggle from 'react-toggle';
|
|
7
8
|
import { NumericFormat, PatternFormat } from 'react-number-format';
|
|
@@ -75,6 +76,7 @@ const Field = ({
|
|
|
75
76
|
settings,
|
|
76
77
|
uploadProgress,
|
|
77
78
|
}) => {
|
|
79
|
+
const editorRef = useRef(null);
|
|
78
80
|
const inputFile = useRef(null);
|
|
79
81
|
const [options, setOptions] = useState([]);
|
|
80
82
|
const [dataOptions, setDataOptions] = useState([]);
|
|
@@ -665,26 +667,45 @@ const Field = ({
|
|
|
665
667
|
break;
|
|
666
668
|
case 'richeditor':
|
|
667
669
|
htmlContainer = (
|
|
668
|
-
<
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
onChangeRicheditor(value, settings.id);
|
|
670
|
+
<Editor
|
|
671
|
+
apiKey="51mqcxkrrco6unmr6h8exc5mkhtjwi6fpyedy3r493px8cbq"
|
|
672
|
+
onEditorChange={(value, e) => {
|
|
673
|
+
onChangeRicheditor(e, value, settings.id);
|
|
673
674
|
}}
|
|
675
|
+
onInit={(evt, editor) =>
|
|
676
|
+
(editorRef.current = editor)
|
|
677
|
+
}
|
|
674
678
|
value={inputValue || ''}
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
679
|
+
init={{
|
|
680
|
+
branding: false,
|
|
681
|
+
height: 500,
|
|
682
|
+
menubar: false,
|
|
683
|
+
plugins: [
|
|
684
|
+
'advlist',
|
|
685
|
+
'autolink',
|
|
686
|
+
'lists',
|
|
687
|
+
'link',
|
|
688
|
+
'image',
|
|
689
|
+
'charmap',
|
|
690
|
+
'preview',
|
|
691
|
+
'anchor',
|
|
692
|
+
'searchreplace',
|
|
693
|
+
'visualblocks',
|
|
694
|
+
'code',
|
|
695
|
+
'fullscreen',
|
|
696
|
+
'insertdatetime',
|
|
697
|
+
'media',
|
|
698
|
+
'table',
|
|
699
|
+
'code',
|
|
700
|
+
],
|
|
701
|
+
toolbar:
|
|
702
|
+
'undo redo | blocks | ' +
|
|
703
|
+
'bold italic forecolor | alignleft aligncenter ' +
|
|
704
|
+
'alignright alignjustify | bullist numlist outdent indent | ' +
|
|
705
|
+
'removeformat | table',
|
|
706
|
+
content_style:
|
|
707
|
+
'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }',
|
|
708
|
+
}}
|
|
688
709
|
/>
|
|
689
710
|
);
|
|
690
711
|
break;
|
package/components/crm/Field.jsx
CHANGED
package/package.json
CHANGED
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
"awesome-debounce-promise": "^2.1.0",
|
|
9
9
|
"axios": "^1.6.5",
|
|
10
10
|
"file-saver": "^2.0.5",
|
|
11
|
-
"framer-motion": "^
|
|
11
|
+
"framer-motion": "^11.0.2",
|
|
12
12
|
"html-react-parser": "^5.1.1",
|
|
13
13
|
"lodash": "^4.17.21",
|
|
14
|
+
"lodash.debounce": "^4.0.8",
|
|
14
15
|
"moment": "^2.30.1",
|
|
15
16
|
"motion": "^10.17.0",
|
|
16
17
|
"numeral": "^2.0.6",
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
"react-dom": "^17.0.1"
|
|
49
50
|
},
|
|
50
51
|
"name": "@visns-studio/visns-components",
|
|
51
|
-
"version": "3.1.
|
|
52
|
+
"version": "3.1.11",
|
|
52
53
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
53
54
|
"main": "index.js",
|
|
54
55
|
"scripts": {
|