WYSIWYG plaintext and rich text fields - #5574
Open
boutell wants to merge 5 commits into
Open
Conversation
boutell
commented
Aug 31, 2026
| "@apostrophecms/apostrophe-astro": minor | ||
| --- | ||
|
|
||
| Added the `AposField` component, which displays one schema field of a document, widget, array item or object and lets the user edit it right where it appears on the page, the way `AposArea` does for areas: |
Member
Author
There was a problem hiding this comment.
Supports astro, nunjucks, and JSX.
| const result = await apos.modules['jsx-field-test'] | ||
| .render(req, 'with-field-inline', { piece: fieldPiece() }); | ||
| assert.match(result, /Tom & <script>/); | ||
| assert.doesNotMatch(result, /<script>/); |
boutell
commented
Aug 31, 2026
|
|
||
| `tag` overrides the tag the field type chose, `class` is added to the classes it asks for rather than replacing them, `style` and `attrs` are passed through, `edit={false}` never offers editing, and any other prop reaches the editor as its options. | ||
|
|
||
| Apostrophe only sends the information for fields that ask for it, with `wysiwyg: true` on the field or the `wysiwygFields` option of the module, since it cannot tell from the data which fields a template renders in place. While developing, `AposField` writes a note to the terminal when it displays a field that did not ask, naming the field and the option to set. A field that was not annotated is still displayed, just not editable, so a page never breaks over it. |
Member
Author
There was a problem hiding this comment.
Both are supported because patching one property of an inherited field is currently awkward.
boutell
commented
Aug 31, 2026
| "apostrophe": patch | ||
| --- | ||
|
|
||
| Rich text permalinks are now substituted as quoted `href` attributes. `linkPermalinks` had been dropping both quotes since permalinks were introduced, emitting `<a href=/contact>` rather than `<a href="/contact">`. Browsers tolerate an unquoted attribute value, so the markup usually behaved, but a URL containing a space became two attributes. This affects rich text everywhere, both widgets and `richText` schema fields, since both share `linkPermalinks`. |
Member
Author
There was a problem hiding this comment.
Funny little ancient bug
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.
No description provided.