Serialize another element
import { toHTML, toJSON, Bold, Link } from 'yurich';
const html = toHTML(element, [Bold, Link]);
const json = toJSON(element, [Bold, Link]);
toHTML and toJSON apply the schema of the given extensions to an existing HTML element. Treat the returned JSON as immutable.