Drupal Text Formats

Standardize Drupal 10+ HTML formats and CKEditor settings with access controls.

34|12|Updated Mar 10, 2019
One-click install
npx skills add https://github.com/theodorosploumis/drupal-best-practices --skill drupal-text-formats
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Drupal Text Formats
Source: https://github.com/theodorosploumis/drupal-best-practices/tree/main/ai/skills/text-formats-editors
Command: npx skills add https://github.com/theodorosploumis/drupal-best-practices --skill drupal-text-formats

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Help Claude align text formats, allowed tags, and CKEditor button sets so authors share a consistent, secure HTML format.

Core Features & Use Cases

  • Ask for a single standardized HTML format with matching CKEditor settings and allowed HTML tags.
  • Request button set recommendations that mirror allowed tags and remove insecure options.
  • Have Claude plan format access to avoid authors switching between overlapping formats.

Quick Start

Design a single HTML text format for authors with CKEditor settings aligned to allowed tags; include access rules to limit format switching.

Frequently Asked Questions about Drupal Text Formats

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize HTML formats and CKEditor settings across Drupal sites?

Standardizing HTML formats involves defining a single allowed HTML tag set, configuring matching CKEditor button sets to align with those tags, and applying consistent access controls so authors cannot switch between conflicting formats. This ensures secure, predictable authoring across your Drupal site.

What's the best way to align CKEditor buttons with allowed HTML tags in Drupal?

Map each CKEditor button to its corresponding allowed HTML tag, then remove insecure options from both the editor configuration and the text format's tag allowlist. This prevents authors from generating HTML that the format will strip or reject, reducing authoring confusion.

Can I use multiple text formats without letting authors switch between them in Drupal?

Yes. Implement mirrored access controls by assigning each text format to specific roles or fields, preventing format switching while maintaining separate configurations for different content types if needed. This enforces a predictable editing experience.

How do I validate that my Drupal text format and CKEditor configuration are consistent?

Use the provided validation script to check that allowed HTML tags match editor button sets and that access rules are correctly applied. This catches misalignments that could cause data loss or security issues before they reach production.

What security risks should I address when configuring text formats in Drupal?

Remove dangerous HTML tags and attributes (like script, iframe, onclick) from both the allowed tags list and CKEditor toolbar to prevent XSS attacks. Restrict format access by role to ensure only trusted users can create content in less-filtered formats.