Text component (deprecated)
Contents
Existing content
Existing text components can still appear in page data and be queried through Guillotine. A front-end rendering such pages needs to handle type: "text" until those components have been replaced.
Querying via GraphQL
Text components appear in the flat components list with type: "text". Their text.value field is a RichText object with raw, processedHtml and structured reference fields, just like an HtmlArea field.
{
guillotine(project: "myproject", branch: "master") {
get(key: "/site/articles/hello") {
components {
type
path
text {
value {
raw
processedHtml
}
}
}
}
}
}
One text entry from
data.guillotine.get.components
{
"type": "text",
"path": "/main/0",
"text": {
"value": {
"raw": "<p>Welcome</p>",
"processedHtml": "<p>Welcome</p>"
}
}
}
The text field is null on other component types. For text containing links, images or macros, also select the structured reference fields and rewrite placeholders before rendering; see Rich text.