Class MjWrapper
java.lang.Object
dev.jcputney.mjml.component.BaseComponent
dev.jcputney.mjml.component.BodyComponent
dev.jcputney.mjml.component.body.AbstractSectionComponent
dev.jcputney.mjml.component.body.MjWrapper
The wrapper component (<mj-wrapper>). Similar to mj-section but wraps multiple sections
together, allowing a shared background color/image across sections. Each child section stacks
vertically within the wrapper.
-
Field Summary
Fields inherited from class AbstractSectionComponent
registryFields inherited from class BaseComponent
globalContext, node, renderContext -
Constructor Summary
ConstructorsConstructorDescriptionMjWrapper(MjmlNode node, GlobalContext globalContext, RenderContext renderContext, ComponentRegistry registry) -
Method Summary
Modifier and TypeMethodDescriptionReturns the default attribute values for this component.Returns the MJML tag name this component handles.render()Renders this component to HTML.Methods inherited from class AbstractSectionComponent
addInnerTdBorderStyles, addInnerTdExtraStyles, addInnerTdPaddingOverrides, buildBackgroundCss, buildBgImageDivStyle, buildBgImageTableStyle, buildInnerTableStyle, buildInnerTdStyle, buildOuterDivStyle, getBoxModel, getCssClass, hasBackgroundUrl, renderNormalScaffold, resolveBackgroundPositionMethods inherited from class BodyComponent
addBorderStyles, addIfPresent, addIfPresent, buildAttributes, buildResponsiveClass, buildStyle, escapeAttr, escapeHref, getChildrenByTags, getContentWidth, orderedMap, parseWidth, registerMediaQuery, renderChildren, resolveShorthandSide, sanitizeContent, sanitizeHrefMethods inherited from class BaseComponent
getAttribute, getAttribute, getNode
-
Constructor Details
-
MjWrapper
public MjWrapper(MjmlNode node, GlobalContext globalContext, RenderContext renderContext, ComponentRegistry registry)
-
-
Method Details
-
getTagName
Description copied from class:BaseComponentReturns the MJML tag name this component handles.- Specified by:
getTagNamein classBaseComponent- Returns:
- the MJML tag name
-
getDefaultAttributes
Description copied from class:BaseComponentReturns the default attribute values for this component.- Specified by:
getDefaultAttributesin classBaseComponent- Returns:
- a map of attribute names to their default values
-
render
Description copied from class:BodyComponentRenders this component to HTML.- Specified by:
renderin classBodyComponent- Returns:
- the rendered HTML string
-