Skip to content

Rule.io SDK


Rule.io SDK / rcml/src / emailRfmSpec

Variable: emailRfmSpec

const emailRfmSpec: EmailRfmSpec

Defined in: rcml/src/email/email-rfm-spec.ts:460

Machine-readable Email RFM specification.

Example

ts
import { emailRfmSpec } from '@rule/rcml'

// Which block nodes are valid inside an rc-text?
emailRfmSpec.flavors['rcml-content'].blockNodes
// → ['paragraph', 'bullet-list', 'ordered-list', 'align']

// Cross-reference with rcmlSpec:
const tag = rcmlSpec.tags['rc-button']    // content.type === 'inline-rcml-content'
const flavor = emailRfmSpec.flavors[tag.content.type]
flavor.singleParagraph  // true

// Attribute schema for the font mark:
emailRfmSpec.marks['font'].attrs['font-weight']
// → { type: 'string', required: false, description: '…' }