portable-text-editor
БесплатноБез исполняемых скриптовНе проверенBuilding or changing a rich text editor with @portabletext/editor (the Portable Text Editor). Load it before adding keyboard behaviour, Enter or Tab handling…
от portabletext★ 290 звёзд на GitHubОб этом скилле
Building with the Portable Text Editor
@portabletext/editor is not a controlled React input and not a DOM you patch by hand. Every user action becomes an editor event, and you change what an event does by registering a Behavior: a guard that decides whether it applies and actions that raise other events. The ready-made plugins are Behaviors plus a state machine for the hard part. Before you write a keydown listener, a DOM caret calculation or a useState mirror of the value, find your intent in the table below.
Decision table
| Intent | Mechanism | Package | What agents do wrong |
|---|---|---|---|
| Change what Enter, Backspace, typing or paste does somewhere | Behavior on the semantic event (insert.break, delete.backward, insert.text, deserialize.data) |
@portabletext/editor/behaviors |
onKeyDown on the editable, or a Behavior on keyboard.keydown for Enter |
| A key with no semantic event (Tab, Alt+Arrow, Escape, a custom hotkey) | Behavior on keyboard.keydown with a createKeyboardShortcut guard |
@portabletext/keyboard-shortcuts |
event.key === 'Tab' without pinning modifiers, so Shift+Tab matches too |
A typed pattern becomes something else (1. to a list, :tag: to an object) |
defineInputRule or defineTextTransformRule in InputRulePlugin |
@portabletext/plugin-input-rule |
Hand-rolled insert.text Behavior with a regex over the block text, which breaks undo |
Smart quotes, em dashes, arrows, (c) and other typographic replacements |
TypographyPlugin (preset, enable, disable), or its exported rules such as rightArrowRule in InputRulePlugin |
@portabletext/plugin-typography |
Writing the rules again with defineTextTransformRule |
Markdown-style shortcuts (# , > , **bold**) |
MarkdownShortcutsPlugin |
@portabletext/plugin-markdown-shortcuts |
Writing the rules again |
Text between a pair of characters gets a decorator (#foo# to italic) |
CharacterPairDecoratorPlugin with decorator and pair |
@portabletext/plugin-character-pair-decorator |
An input rule that deletes the characters and toggles the mark by hand |
A trigger character opens a picker (@, /) |
defineTypeaheadPicker plus useTypeaheadPicker |
@portabletext/plugin-typeahead-picker |
A scanner for the trigger plus DOM caret math and a global keydown listener |
: opens an emoji picker |
useEmojiPicker with createMatchEmojis |
@portabletext/plugin-emoji-picker |
Установить portable-text-editor в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл portable-text-editor?
Building or changing a rich text editor with @portabletext/editor (the Portable Text Editor). Load it before adding keyboard behaviour, Enter or Tab handling, typed shortcuts, paste handling, mention or slash pickers, toolbars or floating menus, UI that reads editor state, saving or syncing the value with a backend, switching documents, or tests for any of these. It names the mechanism to use for each intent and the rules agents get wrong.
Как установить скилл portable-text-editor?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл portable-text-editor запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic