Appearance
Rule.io SDK / rcml/src / rcmlSpec
Variable: rcmlSpec
constrcmlSpec:RcmlSpec
Defined in: rcml/src/email/rcml-spec.ts:189
Machine-readable RCML specification.
Example
ts
import { rcmlSpec } from '@rule/rcml'
// Enumerate all supported tags
Object.keys(rcmlSpec.tags)
// Inspect a tag
const section = rcmlSpec.tags['rc-section']
section.category // 'layout'
section.content // { type: 'children', allowedChildren: ['rc-column'], maxChildren: 20 }
section.attributes['padding'].type // 'padding'
section.attributes['padding'].default // '20px 0'
section.attributes['padding'].required // false