Repository navigation
Conversation
Simple Text 4.0 requires Craft 6 and PHP 8.5, and runs without craftcms/yii2-adapter. - Classes move to the CraftCms\SimpleText namespace. A migration points fields saved by 3.x at the new field class, in the database and in project config. - The input is core's monospaced, auto-growing Textarea control, and the settings use the Ui API. Behave.js is removed, so Tab no longer traps keyboard focus. - Initial Rows is validated as an integer of 1 or more. - ECS and Gulp are replaced by Pint, Larastan and Pest, and CI runs against Craft 6. Amp-Thread-ID: https://ampcode.com/threads/T-01a1bb51-0f73-74f7-8955-0fbf49683b7d Co-authored-by: Amp <amp@ampcode.com>
The field's input is now a `simple-text:textarea` UI control that wraps core's textarea and attaches Behave.js, which closes brackets and quotes, indents new lines inside brackets and continues lists. Tab follows core's Markdown field so it no longer traps keyboard focus: with a selection, Tab and Shift+Tab indent and outdent the lines, otherwise they move focus. Ctrl/Cmd+] and Ctrl/Cmd+[ indent and outdent the current line. Behave.js edits fire `input` events so the control's value stays in sync, and read-only textareas are left alone. Amp-Thread-ID: https://ampcode.com/threads/T-01a1bb51-0f73-74f7-8955-0fbf49683b7d Co-authored-by: Amp <amp@ampcode.com>
brandonkelly
approved these changes
Nov 9, 2026
Amp-Thread-ID: https://ampcode.com/threads/T-01a1bb51-0f73-74f7-8955-0fbf49683b7d Co-authored-by: Amp <amp@ampcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Simple Text 4.0: a native Craft 6 plugin. It no longer needs
craftcms/yii2-adapteror Yii.Saved values, field settings and template/GraphQL output are unchanged. See
UPGRADE.mdandCHANGELOG.md.The Craft 6 release that runs through the adapter is #16 (3.x).
Evidence
Run against craftcms/cms 6.x
6b18aac(Postgres), hosts built fromcraftcms/craft6.x-dev:composer test: 9 passed. Each test was checked by breaking what it covers (dropping the project-config rename,monospace(), themin:1rule, the custom control, or trimming values). Pint, Larastan and Prettier pass.Behave.js in the real entry editor (keyboard events in Chromium):
(,{auto-close and)steps over; Enter inside{}indents;-lists continue; Tab/Shift+Tab with a selection indent/outdent; Ctrl+]/Ctrl+[ indent/outdent the caret line; Tab with nothing selected moves focus to the next control; a Behave-only edit ([→[]) right before Save is saved; read-only revisions are left alone; the textarea keeps its accessible name. Same results with the adapter still installed, and after an upgrade wherecomposer dump-autoloadpublished the scripts.Fresh install with no adapter (
composer show craftcms/yii2-adapter/yiisoft/yii2: not found): field settings render and saveinitialRowsas an int,0shows “must be at least 1”, the editor textarea is monospace with the configured rows and grows from 131px to 188px as lines are added, values save, and front-end{{ entry.docs }}and GraphQL output match 3.x byte for byte. Uninstall and reinstall work.Upgrade from 3.x on Craft 6 + adapter (v6 with adapter - compatibility #16 head
1b8db66), both keeping and removing the adapter:craft:upruns the migration,fields.typeand the project config YAML becomeCraftCms\SimpleText\Field,craft:project-config:diffis clean, content is kept, and editing and saving works afterwards.Upgrade straight from a Craft 5.12.0.1 site running Simple Text 3.1.0 (cms 6.x
31ad9f1, adapter6bbbf5e):craft6-revamp1.3.1, then require 4.0 and runcraft:up. Core migrations and the plugin migration run cleanly,fields.typeand the project config YAML becomeCraftCms\SimpleText\Field,initialRows("6") is kept,craft:project-config:diffis clean, and front-end and GraphQL output match the Craft 5 site byte for byte. In the editor, Behave.js and the Tab rules work, and a Behave-only edit is saved. Field settings render and saveinitialRowsas an int. Aftercomposer remove craftcms/yii2-adapter(with the site's carried-overconfig/craft/general.phpswitched toCraftCms\Cms\Config\GeneralConfigand the Yiiconfig/craft/app.phpremoved), no Yii classes load, and the editor, saving, front end and GraphQL still work.