Skip to content

Commit

Permalink
update for release 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
syjer committed Dec 25, 2024
1 parent 4c74d65 commit 2d211d1
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The code is based on the following projects:

Most of the mj-* tags are supported. It's currently missing:

- mj-include: will be implemented
- ~~mj-include: will be implemented~~ implemented in 1.1.1
- mj-style: the inline attribute will be ignored
- mj-html-attributes: will not be supported, as it requires a css selector

Expand All @@ -38,14 +38,14 @@ maven:
<dependency>
<groupId>ch.digitalfondue.mjml4j</groupId>
<artifactId>mjml4j</artifactId>
<version>1.0.3</version>
<version>1.1.1</version>
</dependency>
```

gradle:

```
implementation 'ch.digitalfondue.mjml4j:mjml4j:1.0.3'
implementation 'ch.digitalfondue.mjml4j:mjml4j:1.1.1'
```

# Use
Expand Down Expand Up @@ -86,16 +86,25 @@ public class App {

The `render` static method accept as a parameters:
1) a string which will be then parsed and processed by the [html5 parser (jfiveparse)](https://github.com/digitalfondue/jfiveparse), or it can accept a `org.w3c.dom.Document`
2) a configuration object with language and optionally direction
2) a configuration object with language, optionally a direction and an [IncludeResolver](https://javadoc.io/doc/ch.digitalfondue.mjml4j/mjml4j/latest/ch.digitalfondue.mjml4j/ch/digitalfondue/mjml4j/Mjml4j.IncludeResolver.html)


## mj-include support

By default, mjml4j don't have an [IncludeResolver](https://javadoc.io/doc/ch.digitalfondue.mjml4j/mjml4j/latest/ch.digitalfondue.mjml4j/ch/digitalfondue/mjml4j/Mjml4j.IncludeResolver.html) configured, thus `mj-include` will not work out of the box, you must implement or specify yourself.
mjml4j offer 2 implementations:
- [FileSystemResolver](https://javadoc.io/doc/ch.digitalfondue.mjml4j/mjml4j/latest/ch.digitalfondue.mjml4j/ch/digitalfondue/mjml4j/Mjml4j.FileSystemResolver.html) if your resources are present on the filesystem
- [SimpleResourceResolver](https://javadoc.io/doc/ch.digitalfondue.mjml4j/mjml4j/latest/ch.digitalfondue.mjml4j/ch/digitalfondue/mjml4j/Mjml4j.SimpleResourceResolver.html) a resolver that need a [ResourceLoader](https://javadoc.io/doc/ch.digitalfondue.mjml4j/mjml4j/latest/ch.digitalfondue.mjml4j/ch/digitalfondue/mjml4j/Mjml4j.ResourceLoader.html) to be implemented


# TODO:
- mj-include
- ~~mj-include~~ implemented in 1.1.1
- check https://github.com/mjmlio/mjml/compare/v4.14.1...v4.15.3 , printing especially
- validation api:
- add "parent element" check
- attribute unit type check
- improve the renderer
- cleanup/rewrite the box model, kinda hacky
- more robust handling of invalid input (check mjml behaviour)


0 comments on commit 2d211d1

Please sign in to comment.