Linking RTF from collection into page Schema <header> tag

Hello,

Client is wanting to use articleBody Schema markup on blog pages for SEO purposes, but the blog posts are currently formatted into Rich Text Fields (RTF) for obvious blog reasons (links, images, formatting).

:thinking: To my knowledge, Webflow doesn’t currently support the ability to use the dynamic (+Add Field) capability to pull a RTF field from a CMS collection into the Custom Code panel of the Inside tag of the collection page.

One workaround I considered was:
(1) using a Plain Text Field, then
(2) using ChatGPT to flatten text & escape any quotation marks, then
(3) copy/paste the flattened text into a Plain Text field (which could be pulled into schema)
… except then I realized they’d have to also do that every time updates are made to any of the blog posts (ie: during routine maintenance and republishing).

Really wish schema from CMS was something webflow supported a bit better. Does anyone have alternate ideas on how to generate (& maintain) articleBody as a schema in a blog collection that uses RTF formatting?


Here is the site Read-Only: LINK
(how to share your site Read-Only link)

You have some options, all of them have challenges.

  • Use your plaintext version of the article body, and have an external automation do the HTML to Plaintext conversion. Zapier, Make, n8n, etc. I typically do HTML → Markdown and then build a special markdown renderer that is JSON-LD-compatible plaintext ( line breaks are escaped, etc. ). If you capture the create and update CMS webhooks, you can have this maintained hands-free.
  • Do a similar thing dynamically with client-side script. Chromium does a good job of executing script but there’s always a chance this will be too beefy, and might not execute quickly enough. As a backup, just emit your JSON-LD without the articleBody
  • Similar again, but reverse proxy. This ensures the JSON is fully formed, and this conversion is fully-automated.