mjml-server
mjml-server copied to clipboard
Pass options like fonts, etc.
First, thank you for your docker image and your work. ❤
MJML offers a lot of options, like fonts, for example. But it would be kind of hard to set every option as environment variable. This problems leads me to following idea: Why not allowing besides text-plain also json and if set so, use mjml for the input? And with an optional config, it would be possible to set the config with a request. This would it also make possible to set current options based on the call. Because sometimes it would be useful, to have certain options defined, and it would not be necessary to run different docker images.
Example request body:
{
"mjml": "string",
"config": {
"fonts": {},
"keepComments": false,
"validationLevel": "strict"
}
}
Like that, if someone use text-plain as header, everything would be the same, with application/json it would use the explained interface.
What do you think about this idea?