By bramdriesen on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.1.x
Introduced in version:
10.1.0
Issue links:
Description:
A new and optional setting is added to the text field types that lets the site-builder determine if the text formats should be restricted. This setting is then used in the default textfield and textarea widgets to remove any non-allowed text formats. If nothing is set, the current behavior is unchanged.
Field API example:
return [
...
'field_type' => 'text',
'settings' => [
'allowed_formats' => [],
],
...
];
Field UI settings example:

| Attachment | Size |
|---|---|
| text-formats.png | 31.39 KB |
Impacts:
Site builders, administrators, editors
Comments
It seems counter intuitive
It seems counter intuitive that none of the options under "Allowed text formats" are checked in the image ...
Agreed - perhaps a note that
Agreed - perhaps a note that all are allowed by default?
Also agree. The issue was not
Also agree. The issue was not recently reviewed at the usability group, I will raise it at a meeting and depending on the outcome a follow-up issue may be created to address any changes that are recommended by the group.
Sorry if I wasn't precise
Sorry if I wasn't precise enough. Actually, it says below the options:
But my point is mostly that if the image is supposed to show case this new feature, I would think that checking for example "Restricted HTML" would be more informative:
... and then below the UI settings image, another image could show the node edit form in action, with no format selection options, to show the result: That you can now only use Restricted HTML format.
Makes sense
Makes sense. I just grabbed a screenshot that was posted in the issue queue. The help text also indeed seems to be missing. I'll check if I can spin up a clean install to grab a more up to date screenshot.