Package com.atlassian.confluence.mail
Class BotocssMailContentProcessor
java.lang.Object
com.atlassian.confluence.mail.BotocssMailContentProcessor
- All Implemented Interfaces:
MailContentProcessor
Takes a serialized HTML document as input and injects CSS taken from the
<style>
tags in to the appropriate elements as inline
style attributes.
This is largely for compatibility with Gmail and a few other email clients
which do not parse stylesheet links or HTML <style>
tags.
The <style>
tags annotated with a
delete-email-style class attribute will also get removed from the
document post-injection. This is in order to reduce the outcoming size of the
mail as Gmail enforces a mail size of lower than 102kB by clipping the mail
on its default view.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BotocssMailContentProcessor
public BotocssMailContentProcessor()
-
-
Method Details
-
process
Takes an HTML input string that includes a <style:> tag somewhere in the HTML, and injects the CSS styles therein in to the HTML.- Specified by:
process
in interfaceMailContentProcessor
- Parameters:
input
- an HTML string with a <style> HTML element in it.- Returns:
- an amended HTML string where the <style> block's CSS has been injected in to the appropriate HTML elements.
-