1.4.10 • Published 16 days ago

@experium/react-editor v1.4.10

Weekly downloads
78
License
MIT
Repository
-
Last release
16 days 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

16 days ago

1.4.9

1 month ago

1.4.6

3 months ago

1.4.8

3 months ago

1.4.7

3 months ago

1.4.3

3 months ago

1.4.2

3 months ago

1.4.1

3 months ago

1.3.77

4 years ago

1.3.76

4 years ago

1.3.75

4 years ago

1.3.74

4 years ago

1.3.73

4 years ago

1.3.72

4 years ago

1.3.71

4 years ago

1.3.70

4 years ago

1.3.69

4 years ago

1.3.68

4 years ago

1.3.65

4 years ago

1.3.66

4 years ago

1.3.67

4 years ago

1.3.64

4 years ago

1.3.62

4 years ago

1.3.63

4 years ago

1.3.61

4 years ago

1.2.60

4 years ago

1.2.59

4 years ago

1.2.58

4 years ago

1.2.57

4 years ago

1.2.56

4 years ago

1.2.54

4 years ago

1.2.55

4 years ago

1.2.53

4 years ago

1.1.52

4 years ago

1.1.49

4 years ago

1.1.51

4 years ago

1.1.50

4 years ago

1.1.48

4 years ago

1.1.47

4 years ago

1.0.46

4 years ago

1.0.40

4 years ago

1.0.44

4 years ago

1.0.43

4 years ago

1.0.42

4 years ago

1.0.41

4 years ago

1.0.45

4 years ago

1.0.39

4 years ago

1.0.38

4 years ago

1.0.37

4 years ago

1.0.36

4 years ago

1.0.35

4 years ago

1.0.34

4 years ago

1.0.33

4 years ago

1.0.32

4 years ago

1.0.31

4 years ago

1.0.30

4 years ago

1.0.29

4 years ago

1.0.28

4 years ago

1.0.27

4 years ago

1.0.26

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago