@visns-studio/visns-components 3.0.3 → 3.0.5
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/crm/Field.jsx +40 -7
- package/package.json +2 -1
package/components/crm/Field.jsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
2
|
import DatePicker from 'react-datepicker';
|
|
3
3
|
import _ from 'lodash';
|
|
4
4
|
import ReactQuill from 'react-quill';
|
|
@@ -7,6 +7,7 @@ import moment from 'moment';
|
|
|
7
7
|
import { BlockPicker } from 'react-color';
|
|
8
8
|
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
9
9
|
import { NumericFormat, PatternFormat } from 'react-number-format';
|
|
10
|
+
import { Editor } from '@tinymce/tinymce-react';
|
|
10
11
|
import { Copy } from 'akar-icons';
|
|
11
12
|
|
|
12
13
|
import CustomFetch from './Fetch';
|
|
@@ -39,6 +40,7 @@ function Field({
|
|
|
39
40
|
settings,
|
|
40
41
|
style,
|
|
41
42
|
}) {
|
|
43
|
+
const editorRef = useRef(null);
|
|
42
44
|
const [colorPickerShow, setColorPickerShow] = useState(false);
|
|
43
45
|
const [dataOptions, setDataOptions] = useState([]);
|
|
44
46
|
const [formItemStyle, setFormItemStyle] = useState({});
|
|
@@ -703,13 +705,44 @@ function Field({
|
|
|
703
705
|
return htmlContainer;
|
|
704
706
|
case 'richeditor':
|
|
705
707
|
return (
|
|
706
|
-
<
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
708
|
+
<Editor
|
|
709
|
+
apiKey="51mqcxkrrco6unmr6h8exc5mkhtjwi6fpyedy3r493px8cbq"
|
|
710
|
+
onEditorChange={(value, e) => {
|
|
711
|
+
onChangeRicheditor(e, value, settings.id);
|
|
712
|
+
}}
|
|
713
|
+
onInit={(evt, editor) => (editorRef.current = editor)}
|
|
714
|
+
initialValue={inputValue || ''}
|
|
715
|
+
init={{
|
|
716
|
+
height: 500,
|
|
717
|
+
menubar: false,
|
|
718
|
+
plugins: [
|
|
719
|
+
'advlist',
|
|
720
|
+
'autolink',
|
|
721
|
+
'lists',
|
|
722
|
+
'link',
|
|
723
|
+
'image',
|
|
724
|
+
'charmap',
|
|
725
|
+
'preview',
|
|
726
|
+
'anchor',
|
|
727
|
+
'searchreplace',
|
|
728
|
+
'visualblocks',
|
|
729
|
+
'code',
|
|
730
|
+
'fullscreen',
|
|
731
|
+
'insertdatetime',
|
|
732
|
+
'media',
|
|
733
|
+
'table',
|
|
734
|
+
'code',
|
|
735
|
+
'help',
|
|
736
|
+
'wordcount',
|
|
737
|
+
],
|
|
738
|
+
toolbar:
|
|
739
|
+
'undo redo | blocks | ' +
|
|
740
|
+
'bold italic forecolor | alignleft aligncenter ' +
|
|
741
|
+
'alignright alignjustify | bullist numlist outdent indent | ' +
|
|
742
|
+
'removeformat | table',
|
|
743
|
+
content_style:
|
|
744
|
+
'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }',
|
|
711
745
|
}}
|
|
712
|
-
value={inputValue || ''}
|
|
713
746
|
/>
|
|
714
747
|
);
|
|
715
748
|
default:
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
3
|
"@inovua/reactdatagrid-community": "^5.10.2",
|
|
4
|
+
"@tinymce/tinymce-react": "^4.3.2",
|
|
4
5
|
"add": "^2.0.6",
|
|
5
6
|
"akar-icons": "^1.9.30",
|
|
6
7
|
"array-move": "^4.0.0",
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
"react-dom": "^17.0.1"
|
|
46
47
|
},
|
|
47
48
|
"name": "@visns-studio/visns-components",
|
|
48
|
-
"version": "3.0.
|
|
49
|
+
"version": "3.0.5",
|
|
49
50
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
50
51
|
"main": "index.js",
|
|
51
52
|
"scripts": {
|