canvas-component-utils
Installation
SKILL.md
Import utilities from the drupal-canvas package:
import { FormattedText, Image } from 'drupal-canvas';
FormattedText
Use FormattedText to render HTML content from props. This is required for any
prop with contentMediaType: text/html in component.yml.
# component.yml
props:
properties:
text:
title: Text
type: string
contentMediaType: text/html
Related skills
More from drupal-canvas/skills
canvas-component-definition
Start here for any React component task to enforce the canonical Canvas
96canvas-component-metadata
Define valid component.yml metadata for Canvas components, including props,
94canvas-data-fetching
Fetch and render Drupal content in Canvas components with JSON:API and SWR
80canvas-component-composability
Design Canvas-ready React components with slots and decomposition-first
78canvas-styling-conventions
Style Canvas components with Tailwind CSS 4 theme tokens and approved utility
77canvas-component-push
Push validated Canvas component changes to Drupal Canvas and recover from
52