wp-admin-codemirror

Official

Add WordPress CodeMirror syntax highlighting

Authorvikingokft
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill solves the problem of turning a plain WordPress admin textarea into a fast, correct editor with syntax highlighting and optional lint feedback.

Core Features & Use Cases

  • Bootstrap with wp_enqueue_code_editor(): Initializes the bundled CodeMirror 5 editor in admin pages and obtains per-MIME settings.
  • Initialize with wp.codeEditor.initialize(): Attaches CodeMirror to the bare textarea by id (or a jQuery selector) using the settings passed to your script.
  • Linting and UX guardrails: Handles linter behavior (csslint/htmlhint/jsonlint and gating by user permissions) and supports instance-level options like readOnly and lint suppression.
  • Real-world use cases: custom CSS fields, snippet editors, JSON/YAML schema editors, regex builders, and webhook preview/config textareas in wp-admin.

Quick Start

Use the Skill to implement CodeMirror on your plugin settings textarea by calling wp_enqueue_code_editor() on the correct $hook_suffix screen and then initializing wp.codeEditor in your admin JS for that textarea id using the returned settings, while guarding against the false return when syntax highlighting is disabled in the user profile.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: wp-admin-codemirror
Download link: https://github.com/vikingokft/wp-agent-skills/archive/main.zip#wp-admin-codemirror

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.