Bootstrap Email Bootstrap Email

ContentCompiler

Utilclass for compiling

Constructor

new ContentCompiler($, logger)

Parameters:
$ ( cheerio )
logger ( Logger )
Source:

Members

(static, constant) ALIGNMENT :string

Properties:
Name Type Description
LEFT string

.float-left

CENTER string

.mx-auto

RIGHT string

.float-right

Source:

(private) _$ :cheerio

Source:

(private) _logger :Logger

Source:

Methods

(private) ._createTable() → {Object}

Creates a table with all required childs

Source:

(private) ._generateGrid(rowSrc, columns, isLG) → {cheerio}

Generates markup for a grid

Parameters:
rowSrc ()
columns ()
isLG ()
Source:

(private) .align(direction)

Handles floats and centered elements

Parameters:
direction ( ALIGNMENT )
Source:

.body()

Wraps body-content

Source:

.component(selector, addonsopt)

Ensures that all components with given selector (class in most cases) are tables

Parameters:
selector ( string )
addons ( object ) <optional>

ElementHelper.wrap

Source:

.container(widthopt)

Wraps and replaces container

Parameters:
width ( number ) <optional>
Source:

(private) .div()

Replaces all divs with tables

Source:

(private) .grid(columns)

Replaces rows and columns to tables and set according separators

Parameters:
columns ( number )

Amount of allowed columns in a row

Source:

.hr()

Replaces all hr tags with the according hr-template

Source:

(private) .margin()

Replaces all margin classes to equivalent spacer elements

Source:

(private) .padding()

Handles all padding classes. If padding-element is not a table, wrap a table around

Source:

(private) .preview()

Replaces preview tag with hidden div and extend content to 100 characters

Source:

(private) .table()

Adds border, cellspacing and cellpadding attributes to all table elements

Source: