public class CssInliner extends Object
Inlines CSS to avoid the dreaded GMail Grimace.
The magic keyword is data-inline="true"
.
style
tag, it inlines the
stylesheet defined there into all html elements matching the rules.
img
tag, it base64 encodes the image it found
to make it visible in the email.
Modifier and Type | Field and Description |
---|---|
static String |
CSS_STYLE |
static String |
DATA_INLINE_ATTR |
static String |
IMG_SRC_ATTR |
static String |
IMG_TAG |
static String |
STYLE_ATTR |
static String |
STYLE_TAG |
Constructor and Description |
---|
CssInliner() |
Modifier and Type | Method and Description |
---|---|
String |
process(String input)
Takes an input string representing an html document and processes it with
the Css Inliner.
|
String |
stripHtml(String input) |
public static final String CSS_STYLE
public static final String STYLE_ATTR
public static final String STYLE_TAG
public static final String IMG_TAG
public static final String IMG_SRC_ATTR
public static final String DATA_INLINE_ATTR
Copyright © 2016–2020. All rights reserved.