Skip to content

Rule.io SDK


Rule.io SDK / rcml/src / emailInlineRfmToJson

Function: emailInlineRfmToJson()

emailInlineRfmToJson(input): Json

Defined in: rcml/src/email/email-rfm-to-json.ts:58

Convert an Email Inline RFM markdown string into an RCML content JSON document.

Email Inline RFM forbids block-level lists, :::align, and hard breaks. Throws RcmlValidationError if the input violates these restrictions.

Parameters

input

string

Email Inline RFM markdown source string.

Returns

Json

Typed RCML document JSON ({ type: 'doc', content: [...] }).

Throws

RcmlValidationError when the input is not valid Email Inline RFM.

Example

ts
const doc = emailInlineRfmToJson(':font[Click here]{font-weight="bold"}')
// { type: 'doc', content: [{ type: 'paragraph', content: [...] }] }