Support Rich Text Alignment Inside Node Body (High‑performance alternative to HTML nodes)
Rey-Wang opened this issue · comments
Description of new feature
The goal is to display multi‑line, wrapped text that is aligned to the node’s inner left edge (or right/justify), with configurable padding and line‑height — without resorting to HTML‑based nodes.

Motivation for new feature
Current label options (text-halign, text-valign, text-wrap, text-max-width, text-margin-x/y, text-background-*) are great, but:
• Left‑aligned text inside the node often needs consistent inner padding and clipping to the node’s content box.
• We need reliable multi‑line wrapping + alignment (left/right/justify) with line-height control for readability.
• HTML nodes (foreign overlays) solve alignment but don’t scale for large graphs (layout, hit‑testing, reflow).
A core, canvas‑based “notes node” would allow documentation‑like nodes (titles + multi‑line notes) with high performance.
For reviewers
Reviewers should ensure that the following tasks are carried out for incorporated issues:
- Ensure that the reporter has adequately described their idea. If not, elicit more information about the use case. You should iteratively build a spec together.
- Ensure that the issue is a good fit for the core library. Some things are best done in extensions (e.g. UI-related features that aren't style-related). Some things are best done by app authors themselves -- instead of in Cytoscape libraries.
- The issue has been associated with a corresponding milestone.
- The commits have been incorporated into the
unstable
branch via pull request. The corresponding pull request is cross-referenced.