Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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
Полный SKILL.md на GitHub

Установить portable-text-editor в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/inline-objects-and-pickers.mdreferences/testing.mdreferences/value-sync.md

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), без исполняемых скриптов.

Похожие скиллы

Сравнить portable-text-editor с