UNPKG

wix-redraft

Version:

Based on github.com/lokiuz/redraft. Adjusted for wix-rich-content needs.

10 lines (8 loc) 359 B
// to render to a plain string we need to be sure all the arrays are joined after render export const joinRecursively = (array) => array.map((child) => { if (Array.isArray(child)) { return joinRecursively(child); } return child; }).join(''); export const makeList = children => children.map(child => `<li>${joinRecursively(child)}</li>`).join('');