textkit2-appkit-reference

Explain TextKit 2 viewport-based layout and mitigations for AppKit text issues.

164|13|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/I7T5/Edmund --skill textkit2-appkit-reference
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: textkit2-appkit-reference
Source: https://github.com/I7T5/Edmund/tree/main/.agents/skills/textkit2-appkit-reference
Command: npx skills add https://github.com/I7T5/Edmund --skill textkit2-appkit-reference

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill serves as a comprehensive guide to the AppKit text system, particularly TextKit 2, within the context of the Edmund Markdown editor. It provides deep insights and mitigations for common issues, helping developers navigate and optimize their text layout and rendering.

Core Features & Use Cases

  • Understanding TextKit 2: Offers detailed explanations of the TextKit 2 object model and viewport-based layout principles.
  • Layout Mitigations: Provides solutions to viewport glitches, attribute-only mutation semantics, and the queued selection fixup issue.
  • Custom Drawing Model: Explains the custom drawing approach used for text layout and decoration, including handling images and math.
  • AppKit Edit Pipeline: Delivers insights into the AppKit edit pipeline contract and how to deal with AppKit's unconventional behavior.
  • IME & Marked Text: Addresses the lifecycle of input methods and marked text, highlighting how to prevent issues related to IME usage.
  • Drag Sessions & swift-markdown Walker: Discusses the complexities of drag sessions and the Swift-markdown parsing model used in Edmund.

Quick Start

Load the skill and consult the section on handling viewport glitches for a deeper understanding of the layout system in Edmund.

Frequently Asked Questions about textkit2-appkit-reference

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

FAQPage Schema
How does TextKit 2 viewport-based layout work in AppKit?

TextKit 2 viewport-based layout calculates text geometry only for the visible region using a specific object model, optimizing rendering performance. This Skill explains those layout principles and how to manage them within the Edmund Markdown editor.

How do I fix viewport glitches during text layout in AppKit?

To fix text layout viewport glitches, you apply specific mitigation strategies for attribute-only mutation semantics and queued selection fixups. This Skill provides solutions to navigate these known AppKit text system pitfalls.

How do I handle the AppKit edit pipeline contract for custom text drawing?

Handling the AppKit edit pipeline involves understanding its contract to manage unconventional behavior during custom text drawing. This Skill explains how to process images and math decorations within the Edmund editor.

How do I manage IME and marked text lifecycle issues in AppKit?

Managing IME and marked text involves monitoring the input method lifecycle to prevent rendering issues. This Skill addresses how to handle marked text semantics and avoid pitfalls related to input methods in AppKit.

How do I process drag sessions and Swift-Markdown parsing in AppKit?

Processing drag sessions with Swift-Markdown involves using a specific parsing walker model to manage complex text interactions. This Skill discusses how to integrate these parsing mechanisms within the Edmund editor workflow.

Is TextKit 2 suitable for building a custom Markdown editor?

TextKit 2 is suitable for a custom Markdown editor when you need viewport-based layout and custom drawing capabilities. This Skill details how to leverage these features while mitigating known AppKit text system limitations.