1.12.4 • Published 7 days ago

@uidu/email-renderer v1.12.4

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
7 days ago

Email renderer

This package provides renderer that is capable of rendering email-friendly HTML from ADF documents.

Usage

Use as follows:

import { defaultSchema } from '@uidu/adf-schema';
import { EmailSerializer } from '@uidu/email-renderer';

const document = ... // Your ADF JSON document

const serializer = EmailSerializer.fromSchema(defaultSchema);
const node = defaultSchema.nodeFromJSON(document);
const result = serializer.serializeFragment(node.content);

Development

Project consists of different serializers in order to render ADF into html

ADF nodes serializers are stored in src/nodes ADF marks serializers are stored in src/marks

HTML rendering occurs via traversal of the ADF and calling the serializer corresponding to each visited ADF Node, as well as applying any marks that exist on a node.

Adding new embedded images / icons

This will generate static image modules that can be used to easily embed inside of email as part of a ADF node serializer, etc.

Currently uses a custom build process, which like this: SVG -> PNG -> Base64 -> TypeScript Module

  • Add the source image to src/static/svg folder and to generator config src/static/image-sources.ts
  • run yarn run build:images
1.12.3

7 days ago

1.12.4

7 days ago

1.12.2

16 days ago

1.12.1

1 month ago

1.12.0

2 months ago

1.11.2

2 months ago

1.11.1

3 months ago

1.11.0

4 months ago

1.10.0

4 months ago

1.9.0

5 months ago

1.8.0

6 months ago

1.7.0

7 months ago

1.6.0

8 months ago

1.5.0

8 months ago

1.4.0

8 months ago

1.3.14

12 months ago

1.3.15

11 months ago

1.3.10

1 year ago

1.3.13

1 year ago

1.3.11

1 year ago

1.3.12

1 year ago

1.3.9

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago

1.3.7

1 year ago

1.3.6

1 year ago

1.3.5

1 year ago

1.3.4

1 year ago

1.3.3

1 year ago

1.3.2

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.3.8

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

2 years ago

0.1.1

2 years ago