@visns-studio/visns-components 3.1.10 → 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.
@@ -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
- <ReactQuill
669
- theme="snow"
670
- name={settings.id}
671
- onChange={(value) => {
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
- modules={modules}
676
- formats={[
677
- 'header',
678
- 'bold',
679
- 'italic',
680
- 'underline',
681
- 'strike',
682
- 'blockquote',
683
- 'list',
684
- 'bullet',
685
- 'link',
686
- 'image',
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;
@@ -17,7 +17,6 @@ import VisnsAutocomplete from './Autocomplete';
17
17
  import VisnsDropZone from '../cms/DropZone';
18
18
 
19
19
  import 'react-toggle/style.css';
20
- import 'react-quill/dist/quill.snow.css';
21
20
  import 'react-datepicker/dist/react-datepicker.css';
22
21
 
23
22
  function Field({
package/package.json CHANGED
@@ -49,7 +49,7 @@
49
49
  "react-dom": "^17.0.1"
50
50
  },
51
51
  "name": "@visns-studio/visns-components",
52
- "version": "3.1.10",
52
+ "version": "3.1.11",
53
53
  "description": "Various packages to assist in the development of our Custom Applications.",
54
54
  "main": "index.js",
55
55
  "scripts": {