- Issue created by @johntarling
- First commit to issue fork.
- πΊπΈUnited States justin2pin
Merge Request !13 introduces a
data-me-max_length
data attribute, which the "basic" JavaScript editor uses to enforce field length limits. Here are a few key points:- This functionality applies only to "basic" editors and does not support CKEditor 5-enabled fields.
- Enforcing character limits in CKEditor 5 is not straightforward and requires custom solutions.
- CKEditor 5 is not the default editor for short formatted text fields in Drupal. It is only available for fields that use "textarea" form inputs.
- This approach adds a custom data attribute (
data-me-max_length
) using themax_length
setting from the field definition. Developers who want to define custom limits for field lengths can use a custom implementation of thehook_preprocess_field
function to add thedata-me-max_length
data attribute with the desired value.