I am trying to get HTML code to show up on a collection page. I have hundreds of fields and I really don’t want to hand format every rich text field for every entry. So, I created a script that turns my content into HTML, then I want to upload that code into a Collection field.
So far, I have tried putting the code in a Rich Text field. Didn’t work.
Putting the code into a multi-line text field and then try to dynamically put it in an Embed element. Didn’t work.
Does anyone have any way to include HTML as a field in a Collection?
Rich text fields should provide well for basic HTML - paragraphs, headings, lists, images, etc.
If you need other elements or unusual constructions you need to do an HTML embed.
Webflow’s CMS does not have an HTML Embed field type, however the Rich Text field does offer it as a sub-element type, in the same way it supports video and images.
You can store your custom HTML inside of an HTML embed that is inside of a rich text field. Bind that to a rich text element on your canvas and you’ll get your custom HTML.
Bind the HTML Embed to the Collection’s Rich Text Field that stores the HTML
If I understood this correctly, then unfortunately, this doesn’t work. I can’t bind a Collection field to an HTML Embed Element within a Rich Text Field.
If I create the HTML Embed in the Collection Item List, I can’t bind it to a Rich Text Field. I can bind it to a text field, but unfortunately, that doesn’t display the HTML correctly.
I’m not trying to do any tricky HTML. Just headings, bullets, and paragraphs.
I have tried binding the HTML (in the collection as a Rich Text Field) to a Rich Text Field in the Collection List. It shows the raw HTML instead of the formatted HTML. Example <‘bold>Text<’/bold> rather than bolded text.
If I create a Rich Text Field, then create an Embed within it and manually paste the HTML in it, this works fine. However, when you put an Embed within a Rich Text Field in a Collection list, you can’t bind a Collection Field to it.
If I create an Embed on its own in a Collection List, I can not bind a Rich Text Field to a Embed element. I can bind just about any other type of field, just not a Rich Text field. I have tried putting the HTML in a regular text field and binding it to an Embed element outside of a Rich Text Field, and that doesn’t show the formatted HTML.
Maybe I am just too much of a Boomer, but I can’t figure this one out for the life of me.
Sorry for my brain not working. Oh man, I am an idiot. I just figured out what you were all trying to tell me. Create the Rich Text field in the collection, Create an Embed within the Collection field, insert HTML into the Embed.
I really am a boomer. Now, I just need to figure out how to create an Embed within a Rich Text field from something like Make so I can automat this.
If you’re just doing basic HTML with elements that are already supported by the richtext element, you’ll just want to use that and populate it via the API. Webflow will parse your supplied HTML content accordingly when you update that field through the API.