Skip to content

[Bug] Univer getValue() returns null for rich text cells #1

Description

@kikyujin

Summary

Some cells return null from getValue() after save/reload.
The cell data is stored in Univer's rich text format ({ p: [{ v: "..." }] }) instead of plain string, causing the standard accessor to miss it.

Reproduction

  1. Enter Japanese text in a cell
  2. Save notebook (Ctrl+S)
  3. Reload the page
  4. getValue() returns null for that cell

Not all cells are affected — seems to depend on Univer's internal decision to store as rich text vs plain value.

Workaround

Added getCellValue helper that checks both v (plain) and p[0].v (rich text) paths.

Root Cause

Likely a Univer-side behavior (not yet reported upstream).
To investigate: under what conditions does Univer choose rich text storage for plain text input.

Related

  • Univer version: 0.18.0
  • Phase 0 completed, discovered during Phase 1 prep

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupstreamIssue caused by dependency (Univer, etc.)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions