Skip to content

Option to disable word-based line wrapping in text area #690

Open
@dbohdan

Description

@dbohdan

Is your feature request related to a problem? Please describe.
I have started using the text area component in my new password manager, pago. The text area applies whole-word line wrapping. If one character of the word exceeds the line width, the word is wrapped to the next line. This is common and useful for writing prose but not normally used for text-based data. It means long cryptographic tokens like the keys in the following example aren't wrapped at all. I'll illustrate this with screenshots below.

# created: 2024-12-18T06:42:28+00:00
# public key: age1n207up3rglzp87mwgu03ne3m4uzdxasynrqpgxwcwa5tsfvlpf2qsrfhaj
AGE-SECRET-KEY-1Z9ZU8AHM3LW4PQG8FX03TWUHFAMQYUGU0ZTWMN2787CD29D0KV9SX4H6WH

Describe the solution you'd like
I would like a setting to switch from whole-word line wrapping to breaking the word on any character the way code editors do.

Describe alternatives you've considered
The alternatives are to leave things as they are (this isn't a deal-breaker), fork the text area component, or replace it.

Additional context
Here is how the wrapping mechanism normally works.
Screenshot with the unwrapped line.
The last word gets wrapped after you add one more space.
Screenshot with the same line wrapped.

Here is how it fails with a long age private key.
before-key-long
The user presses Space, and the whole token is shifted down one line.
after-key-long

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions