1.4.10 • Published 1 year ago

@experium/react-editor v1.4.10

Weekly downloads
78
License
MIT
Repository
-
Last release
1 year ago

React editor

<FormBuilder />

Form editor component

FormBuilder Props

  • components: custom form editor fields.
  • getComponents: map form editor fields.
  • data: form editor data.
  • showSimple: form editor correct field values.
  • uploadUrl: form editor url for file upload.
  • downloadUrl: form editor url for file download.
  • uploadImages: form editor upload by url images for options.
  • placeholder: default text string for new items in radio buttons and checkboxes.
  • onChange: onChange handler will be called when form data will be changed.
  • onPreviewOpen: onPreviewOpen handler will be called when preview modal will be opened.
  • onPreviewClose: onPreviewClose handler will be called when preview modal will be closed.

Form editor fields

const formEditorItems = [
    {
        type: 'Editor',
        name: 'Текст',
        icon: 'font',
        renderInfo: props => props.content,
        component: Editor,
        formComponent: EditorComponent,
        props: {
            content: ''
        },
        staticContent: true,
        fields: [
            { type: 'editor', label: 'Текст', prop: 'content' }
        ]
    }
];
  • type: type of item. Must be unique.
  • name: text in toolbar.
  • icon: icon in toolbar. Use fontawesome version 4.
  • renderInfo: function renders data in draggable row.
  • component: component which will be respresent in draggable row.
  • formComponent: component which will be respresent in form.
  • props: field props.
  • staticContent: true if field isn't changable.
  • fields: array of fields, which will be shown in field edit modal.

Edit modal field types

  • editor: text editor field.
  • multiple: field for multiple items such as radio buttons and checkboxes.
  • input: input field.
  • switch: switch field.

<FormGenerator />

  • values: form values.
  • data: form editor data.
  • onSubmit: onSubmit handler will be called when a user submits the form and all validation passes.
1.4.10

1 year ago

1.4.9

1 year ago

1.4.6

1 year ago

1.4.8

1 year ago

1.4.7

1 year ago

1.4.3

1 year ago

1.4.2

1 year ago

1.4.1

1 year ago

1.3.77

5 years ago

1.3.76

5 years ago

1.3.75

5 years ago

1.3.74

5 years ago

1.3.73

5 years ago

1.3.72

5 years ago

1.3.71

5 years ago

1.3.70

5 years ago

1.3.69

5 years ago

1.3.68

5 years ago

1.3.65

5 years ago

1.3.66

5 years ago

1.3.67

5 years ago

1.3.64

5 years ago

1.3.62

5 years ago

1.3.63

5 years ago

1.3.61

5 years ago

1.2.60

5 years ago

1.2.59

5 years ago

1.2.58

5 years ago

1.2.57

5 years ago

1.2.56

5 years ago

1.2.54

5 years ago

1.2.55

5 years ago

1.2.53

5 years ago

1.1.52

5 years ago

1.1.49

5 years ago

1.1.51

5 years ago

1.1.50

5 years ago

1.1.48

5 years ago

1.1.47

5 years ago

1.0.46

5 years ago

1.0.40

5 years ago

1.0.44

5 years ago

1.0.43

5 years ago

1.0.42

5 years ago

1.0.41

5 years ago

1.0.45

5 years ago

1.0.39

5 years ago

1.0.38

5 years ago

1.0.37

5 years ago

1.0.36

5 years ago

1.0.35

5 years ago

1.0.34

5 years ago

1.0.33

5 years ago

1.0.32

5 years ago

1.0.31

5 years ago

1.0.30

5 years ago

1.0.29

5 years ago

1.0.28

5 years ago

1.0.27

5 years ago

1.0.26

5 years ago

1.0.25

5 years ago

1.0.24

5 years ago

1.0.23

5 years ago

1.0.22

5 years ago

1.0.21

5 years ago

1.0.20

5 years ago

1.0.19

5 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago