Skip to content

Rich inline text leaf: styled spans, links, inline-code background #249

Closed

Description

@samitbasu

One wrapping text node made of spans, each with its own style (weight, italic, colour, monospace), built on egui's LayoutJob sections and measured and drawn as one galley.

  • Links: per-span hit-testing from the galley's glyph rects, a pointer cursor, and ctx.open_url for external links or an app callback for internal ones.
  • Inline code: a tinted rounded background behind code spans, drawn from their glyph rects.
  • Selection: works with selectable text (Selectable text: render text nodes through egui Labels from the measured galley #39).
  • Docs: TODO(prose) placeholders only (the user writes the prose).

Part of #248 (documentation site).

Activity

  1. added
    v0.1
    on Nov 15, 2026
  2. samitbasu commented on Nov 16, 2026

    @samitbasu
    OwnerAuthor

    API refinement in PR #264 (to confirm with the user): link routing is by scheme. An href with a URL scheme (https:, mailto:) goes to ctx.open_url (a new tab with a modifier), and any other href (#anchor, relative) goes to .on_link. This keeps external links working in apps that also handle internal ones.

  3. added a commit that references this issue on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    v0.1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions