jgraph / jgraph/drawio

[Feature Request] Add option to disable automatic text wrapping by default

Open
#5,308 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
8.2k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Description

Currently, when creating new text elements in draw.io, the "Word Wrap" option is enabled by default. For users who frequently work with single-line labels (such as network diagrams, IP addresses, technical annotations), this behavior requires manual adjustment every time.

Current Behavior

  • Every new text element has "Word Wrap" checked by default
  • Users need to manually uncheck it for each text element
  • No global setting available to change this default behavior

Desired Behavior

Add a configuration option that allows users to:

  1. Set "Word Wrap" to be disabled by default for new text elements
  2. Either through:
    • A checkbox in Settings/Preferences: "Enable word wrap for new text by default"
    • A configuration JSON option like:
     {
       "defaultTextStyle": {
         "whiteSpace": "nowrap"
       }
     }

Use Cases

This feature would benefit users who:

  • Create network topology diagrams with IP addresses and technical labels
  • Build flowcharts with concise, single-line text
  • Work with tables where text should not wrap
  • Prefer manual line breaks over automatic wrapping

Workaround Attempted

I've tried modifying the configuration and creating custom text libraries, but the default behavior persists for new text elements.

Environment

  • draw.io version: [latest]
  • Platform: Web
  • Browser : Chrome

Additional Notes

I understand this is a small quality-of-life improvement, but it would save significant time for users who consistently need this behavior. Having it as an opt-in setting would preserve the current default for other users.

Thank you for considering this feature request! 🙏

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating where the default Word Wrap behavior for new text elements is defined and where draw.io Settings or Preferences are handled. Add a user-controlled default for new text, then verify that the option affects newly created text while preserving the existing default for users who do not change it.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.