Skip to content

Commit c03dbe1

Browse files
committed
2 parents 200ad02 + e0f8729 commit c03dbe1

File tree

1 file changed

+34
-17
lines changed

1 file changed

+34
-17
lines changed

README.md

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ Enhance your app with [MailUi](https://mailui.co) user-friendly [React.js](https
44
designing emails. Enjoy
55
it's easy drag-and-drop editor, making email creation a breeze!
66

7-
[![React MailUi Editor](https://cdn.mailui.co/photos/mailui-editor-preview.png)](http://react-mailui-editor.vercel.com)
7+
[![React MailUi Editor](https://camo.envatousercontent.com/c5a07583e98a3019bcdc7b0d5a7c4d0ef8b36e98/68747470733a2f2f63616d6f2e67697468756275736572636f6e74656e742e636f6d2f373737356430323236313637303232613134353334313565316336326165636131316532383530373366663135366563646331616135313662386534656136382f363837343734373037333361326632663664363136393663373536393265363336663266363936643631363736353733326636643631363936633735363932653661373036353637)](https://mailui.co/)
88

99
## Table of contents
1010

1111
- [Live Demo](#live-demo)
1212
- [Getting started](#getting-started)
13-
- [Installation](#installation)
14-
- [Usage](#usage)
15-
- [Methods](#methods)
16-
- [Properties](#properties)
13+
- [Installation](#installation)
14+
- [Usage](#usage)
15+
- [Methods](#methods)
16+
- [Properties](#properties)
1717
- [Browser support](#browser-support)
18-
- [React](#react)
18+
- [React](#react)
1919
- [Localization](#localization)
2020
- [License](#license)
2121

@@ -42,6 +42,25 @@ OR
4242
yarn add react-mailui-editor
4343
```
4444

45+
### React installation
46+
47+
```
48+
npm i mailui-editor-react@latest
49+
```
50+
51+
```javascript
52+
import MailUiEditor from "mailui-editor-react";
53+
54+
<MailUiEditor
55+
onReady={(mailui) => mailui.loadDesign({})}
56+
options={{
57+
projectId: ‘‘,
58+
signature: ““
59+
}}
60+
/>
61+
62+
```
63+
4564
### Usage
4665

4766
Require the MailUiEditor component and render it with JSX:
@@ -96,7 +115,7 @@ the [MailUi Docs](https://docs.mailui.co/) for more information, or log the obje
96115
are the most used ones:
97116
98117
| method | params | description |
99-
|----------------|---------------------|---------------------------------------------------------|
118+
| -------------- | ------------------- | ------------------------------------------------------- |
100119
| **loadDesign** | `Object data` | Takes the design JSON and loads it in the editor |
101120
| **saveDesign** | `Function callback` | Returns the design JSON in a callback function |
102121
| **exportHtml** | `Function callback` | Returns the design HTML and JSON in a callback function |
@@ -108,8 +127,8 @@ are the most used ones:
108127
- `onLoad` {`Function`} called when the editor instance is created
109128
- `onReady` {`Function`} called when the editor has finished loading
110129
- `options` {`Object`} options passed to the MailUi editor instance (default {})
111-
- See the [MailUi Docs](https://docs.mailui.co/docs/getting-started#configuration-options) for all available
112-
options.
130+
- See the [MailUi Docs](https://docs.mailui.co/docs/getting-started#configuration-options) for all available
131+
options.
113132
- `style` {`Object`} style object for the editor container (default {})
114133
115134
## Browser support
@@ -125,9 +144,8 @@ The following browsers are supported out of the box in MailUi v0.0.1.beta:
125144
- Firefox ≥44
126145
- Opera ≥27
127146
128-
[//]: # (- IE &#40;not supported&#41;)
129-
130-
[//]: # (If you need to support older browsers, you will need to use React-PDF v6 or v5.)
147+
[//]: # '- IE (not supported)'
148+
[//]: # 'If you need to support older browsers, you will need to use React-PDF v6 or v5.'
131149
132150
Please be aware that the MailUi editor is currently not compatible with `Internet Explorer`, and there are no plans to
133151
add support for it in the future.
@@ -139,12 +157,11 @@ To use the latest version of MailUi editor, your project needs to use React 15.5
139157
If you use an older version of React, please refer to the table below to a find suitable MailUi version.
140158
141159
| React version | Newest compatible MailUi version |
142-
|---------------|----------------------------------|
160+
| ------------- | -------------------------------- |
143161
| ≥15.5 | latest |
144162
145-
[//]: # (| ≥16.8 | latest |)
146-
147-
[//]: # (| ≥16.3 | 5.x |)
163+
[//]: # '| ≥16.8 | latest |'
164+
[//]: # '| ≥16.3 | 5.x |'
148165
149166
## Localization
150167
@@ -154,4 +171,4 @@ Translations managed by [PhraseApp](https://phraseapp.com)
154171
155172
### License
156173
157-
Copyright (c) 2023 MailUi. [MIT](LICENSE) Licensed.
174+
Copyright (c) 2023 MailUi. [MIT](LICENSE) Licensed.

0 commit comments

Comments
 (0)