@atlaskit/email-renderer
TypeScript icon, indicating that this package has built-in type declarations

9.2.3 • Public • Published

Email renderer

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

Usage

Use as follows:

import { defaultSchema } from '@atlaskit/adf-schema';
import { EmailSerializer } from '@atlaskit/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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
9.2.30latest
8.1.30next

Version History

VersionDownloads (Last 7 Days)Published
9.2.30
9.2.261
9.2.15
9.2.04
9.1.14
9.1.02
9.0.00
8.14.62
8.14.50
8.14.40
8.14.30
8.14.20
8.14.13
8.14.00
8.13.3208
8.13.20
8.13.10
8.13.00
8.12.01
8.11.00
8.10.10
8.10.00
8.9.00
8.8.30
8.8.20
8.8.10
8.8.00
8.7.10
8.7.00
8.6.40
8.6.30
8.6.20
8.6.10
8.6.00
8.5.200
8.5.190
8.5.181
8.5.170
8.5.160
8.5.150
8.5.141
8.5.130
8.5.120
8.5.110
8.5.100
8.5.90
8.5.80
8.5.70
8.5.60
8.5.50
8.5.40
8.5.30
8.5.20
8.5.10
8.5.00
8.4.00
8.3.30
8.3.20
8.3.10
8.3.00
8.2.50
8.2.40
8.2.30
8.2.20
8.2.10
8.2.00
8.1.50
8.1.40
8.1.30
8.1.20
8.1.10
8.1.00
8.0.130
8.0.120
8.0.1120
8.0.100
8.0.90
8.0.80
8.0.70
8.0.60
8.0.50
8.0.40
8.0.30
8.0.20
8.0.10
8.0.00
7.0.00
6.3.0217
6.2.50
6.2.40
6.2.310
6.2.20
6.2.10
6.2.00
6.1.90
6.1.80
6.1.70
6.1.60
6.1.50
6.1.40
6.1.353
6.1.20
6.1.10
6.1.00
6.0.20
6.0.10
6.0.00
5.0.20
5.0.10
5.0.00
4.2.10
4.2.00
4.1.10
4.1.00
4.0.30
4.0.20
4.0.10
4.0.00
3.0.20
3.0.10
3.0.00
2.10.30
2.10.20
2.10.10
2.10.00
2.9.00
2.8.00
2.7.10
2.7.00
2.6.00
2.5.00
2.4.00
2.3.00
2.2.00
2.1.00
2.0.00
1.4.00
1.3.01
1.2.01
1.1.11
1.1.01
1.0.01

Package Sidebar

Install

npm i @atlaskit/email-renderer

Weekly Downloads

597

Version

9.2.3

License

Apache-2.0

Unpacked Size

473 kB

Total Files

440

Last publish

Collaborators

  • atlassianartifactteam