KS
Killer-Skills

editor-core — how to use editor-core how to use editor-core, editor-core alternative, editor-core setup guide, what is editor-core, editor-core vs tinymce, editor-core install, contenteditable editor, in-browser editing, URL storage

v1.0.0
GitHub

About this Skill

Ideal for Code Editor Agents requiring robust in-browser text manipulation with built-in history management. editor-core is an in-browser editor that utilizes a contenteditable element, managed by the Editor class, to store content in the URL.

Features

Manages contenteditable element using the Editor class
Debounced highlighting for optimized performance
Supports local version history for seamless editing
Enables block editor functionality for structured content
Allows sharing via link or QR code for easy collaboration

# Core Topics

HKTITAN HKTITAN
[0]
[0]
Updated: 3/6/2026

Quality Score

Top 5%
51
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add HKTITAN/kheMessage/editor-core

Agent Capability Analysis

The editor-core MCP Server by HKTITAN is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for how to use editor-core, editor-core alternative, editor-core setup guide.

Ideal Agent Persona

Ideal for Code Editor Agents requiring robust in-browser text manipulation with built-in history management.

Core Value

Enables real-time contenteditable element manipulation with debounced highlighting and comprehensive undo/redo history tracking. Provides direct access to cursor/selection management and keyboard shortcut implementation through the Editor class interface.

Capabilities Granted for editor-core MCP Server

Fixing cursor positioning issues in contenteditable elements
Implementing custom keyboard shortcuts for text manipulation
Enhancing undo/redo functionality in web-based editors
Debugging text input behavior in rich text interfaces

! Prerequisites & Limits

  • Browser-based implementation only
  • Requires contenteditable DOM element
  • URL storage limits content size
  • Debounced highlighting adds 30ms delay
Project
SKILL.md
1.9 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

Editor Core Skill

Work with the contenteditable editor in kheMessage.

When to Use

  • Modifying text input behavior
  • Fixing cursor/selection issues
  • Enhancing undo/redo functionality
  • Adding keyboard shortcuts

Editor Implementation

The Editor class manages the contenteditable element:

javascript
1function Editor(element, highlight) { 2 const listeners = [] 3 const history = [] 4 let at = -1, prev 5 6 // Debounced highlighting 7 const debounceHighlight = debounce(30, () => { 8 const pos = save() 9 highlight(element) 10 restore(pos) 11 }) 12 13 // Event handlers 14 on('keydown', event => { /* ... */ }) 15 on('keyup', event => { /* ... */ }) 16 on('paste', () => setTimeout(recordHistory, 10)) 17 on('cut', () => setTimeout(recordHistory, 10)) 18 19 return { 20 set(content) { /* ... */ }, 21 undo() { /* ... */ }, 22 redo() { /* ... */ }, 23 destroy() { /* ... */ } 24 } 25}

Key Functions

save() / restore()

Saves and restores cursor position across DOM changes:

  • Handles text nodes and element nodes
  • Preserves selection direction
  • Works with normalized DOM

recordHistory()

Records editor state for undo/redo:

  • Stores HTML and cursor position
  • Debounced to avoid excessive entries
  • Limited to 10,000 entries

highlight()

Applies Markdown formatting:

  • Called via parseMarkdown function
  • Replaces text nodes with styled spans
  • Preserves cursor position

Keyboard Shortcuts

ShortcutAction
Ctrl+ZUndo
Ctrl+Y / Ctrl+Shift+ZRedo
Ctrl+SSave
Ctrl+NNew note
Ctrl+OImport file

ContentEditable Quirks

  • Use plaintext-only mode to avoid HTML injection
  • Normalize DOM after changes
  • Handle composition events for IME
  • Watch for beforeinput events

Adding Features

When extending the editor:

  1. Add event listener via on()
  2. Save position before DOM changes
  3. Restore position after changes
  4. Record history for undoable actions

Related Skills

Looking for an alternative to editor-core or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication