Skip to content

Commit

Permalink
Using prettier for beautifying
Browse files Browse the repository at this point in the history
  • Loading branch information
cohitre committed Mar 4, 2024
1 parent 093dadb commit 7825ffc
Show file tree
Hide file tree
Showing 12 changed files with 127 additions and 629 deletions.
30 changes: 25 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,35 @@ From the builder, a clean JSON or raw HTML is available for download.

## Using EmailBuilder.js

Coming soon
Install the package in your project

<br>
```bash
npm install --save @usewaypoint/email-builder
```

## Self-host install
Given an EmailBuilder configuration

Coming soon
```javascript
const CONFIGURATION = {
// ...
};
```

<br>
Rendering your HTML email into a string

```javascript
import { renderHtmlDocument } from '@usewaypoint/email-builder';

const string = renderHtmlDocument(CONFIGURATION, 'root');
```

Rendering your email as a React component

```javascript
import { Reader } from '@usewaypoint/email-builder';

<Reader document={CONFIGURATION} rootBlockId="root" />;
```

## Brought to you by the Waypoint team

Expand Down
Loading

0 comments on commit 7825ffc

Please sign in to comment.