Skip to content

Block Editor 2.0: improvements and bug fixes #35683

@rjvelazco

Description

@rjvelazco

Description

Follow-up work for the Block Editor 2.0 effort tracked in #35262. This ticket groups several improvements and one backward-compatibility bug fix that surfaced during QA / dogfooding on dotcms.com. These items are intentionally scoped to land after the Block Editor 2.0 merger so we do not block that release.

Three areas of work are in scope:

  1. Restore the attrs key on Block Editor nodes — backward-compatibility bug reported by Andres Paredes. In previous Block Editor versions every node had an attrs object (carrying level for headings, textAlign, href, etc.). In 2.0, attrs can be null, which crashes any client-side node-processing code that is not null-aware. This took down dotcms.com. A targeted fix was already shipped in the dotcms.com node-processing code, but we need to restore the key on the editor/output side so other customers do not hit this. Add tests that lock in the contract.

  2. Native spell-check support — Will Ezell reported that right-click was being overwritten by the "Paste as Markdown" flyout, breaking the browser's native spell-check. "Paste / Copy as Markdown" has since been moved to the toolbar, so native spell-check should now work — we need to verify across supported browsers and add a regression check.

  3. Rework table actions on the toolbar — Will Ezell flagged that table-related buttons (merge, add row, add column, etc.) consume too much real estate. Today they are auto-disabled when the user is not inside a table, but they still take up space. Several directions were discussed in Slack with Melissa from design. We need to align with design on the approach, then implement it while keeping all current table actions reachable.

  4. [Object Object] bug when saving — Fatima reported that after making a few changes to a block editor content, and saving, all the content dissapeared and turned into '[Object object]'. This happened after modifying the editor content created and saved by another user.

Acceptance Criteria

1. Restore attrs key on nodes (highest priority — customer-impact bug)

  • Block Editor 2.0 output always emits an attrs key on every node (never null).
  • When a node has no semantic attributes, attrs is an empty object {} rather than null.
  • Existing semantic attributes (level, textAlign, href, etc.) continue to be emitted as before.
  • Unit / contract tests cover headings, paragraphs, links, and other node types to lock in the shape and prevent regressions.

2. Native spell-check support

  • Native browser spell-check works inside Block Editor content (red underlines visible, right-click "Add to dictionary" / suggestions reachable) on Chrome, Firefox, Safari, and Edge.
  • No custom right-click menu intercepts the native context menu inside editable content.
  • An e2e or manual regression check is documented so this does not silently regress again.

3. Rework table actions on the toolbar

  • Align with design (Melissa) on the chosen approach. Options on the table:
    • A single "Table options" toolbar entry that opens a popover / menu containing all table actions.
    • Show only the currently most-relevant action and move the rest under a menu (Melissa's suggestion).
    • A responsive overflow menu pattern aligned with our design system.
  • Implement the chosen approach.
  • All existing table actions (merge cells, add row above/below, add column left/right, delete row, delete column, delete table, etc.) remain reachable from the new UI.
  • Toolbar real estate is measurably reduced when the user is not inside a table.

4. [Object Object] bug when saving

  • Identify causes for content to get corrupted and dislayed as an object
  • Avoid content loss after content gets edited

Priority

Medium (the attrs item is the highest-priority subtask because of confirmed customer impact).

Additional Context

Related: #35262 (Block Editor v2)

Slack discussion threads (#feat-block-editor-upgrade):

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Task.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions