Text Formats and Editors

Create standardized HTML text formats and aligned CKEditor configurations for Drupal 10+ sites.

34|12|Updated Mar 10, 2019
One-click install
npx skills add https://github.com/theodorosploumis/drupal-best-practices --skill text-formats-and-editors
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Text Formats and Editors
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 text-formats-and-editors

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill eliminates the chaos of multiple, inconsistent text formats and editor settings that can lead to security vulnerabilities, broken layouts, and author frustration. It ensures a streamlined, secure, and predictable content authoring experience.

Core Features & Use Cases

  • Standardized HTML Format: Establish a single, secure HTML format for most authors, reducing complexity.
  • Aligned CKEditor Settings: Configure CKEditor buttons to precisely match allowed HTML tags, preventing authors from introducing invalid markup.
  • Controlled Format Access: Plan format access rules to prevent authors from switching between overlapping or insecure formats.
  • Use Case: Configure a new Drupal site by asking Claude to design a single "Rich Text" format for content editors, ensuring only safe HTML tags are allowed and the CKEditor toolbar provides only the necessary buttons.

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 Text Formats and Editors

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

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

Standardizing HTML formats involves creating a single secure text format, configuring CKEditor toolbar buttons to match allowed HTML tags, and setting access controls to prevent format switching. This ensures consistent, safe content authoring and eliminates editor configuration conflicts.

What HTML tags should I allow in a Drupal text format for security?

Restrict allowed tags to those necessary for your content type—typically paragraphs, emphasis, links, lists, and headings—while blocking script, iframe, and event-handler tags. The Skill provides shell-script validation to verify tag alignment between your HTML format and CKEditor toolbar.

Can I use CKEditor with multiple text formats on the same Drupal site?

Multiple overlapping formats create author confusion and security risks. Best practice is a single, standardized format with aligned CKEditor settings and clear access controls. This prevents authors from switching between formats and introducing inconsistent or unsafe markup.

How do I prevent authors from using unsupported HTML tags in CKEditor?

Configure CKEditor buttons to expose only tags defined in your Drupal HTML format, then restrict format access so authors cannot switch to formats with different tag sets. Validation scripts confirm toolbar buttons and allowed tags remain synchronized.

What's the difference between defining allowed HTML tags and configuring CKEditor buttons?

Allowed HTML tags define what markup Drupal accepts and stores; CKEditor buttons control which formatting options authors see in the editor. Both must align—if a button exists but its tag isn't allowed, authors create invalid content that Drupal strips.