Skip to content

feat(web-pkg): add text align support to tiptap-json strategy - #3195

Merged
AlexAndBear merged 3 commits into
mainfrom
feat/tiptap-json-text-align
Aug 21, 2026
Merged

AlexAndBear merged 3 commits into
mainfrom
feat/tiptap-json-text-align

Conversation

@AlexAndBear

Copy link
Copy Markdown
Member

Description

This enhancement adds missing text alignment support to the tiptap-json content strategy so it matches the editor capabilities already available in other rich-text strategies.

Changes made:

  • Added TextAlign extension to tiptap-json strategy with heading and paragraph support
  • Added text-align action group (align-left, align-center, align-right, align-justify) to the tiptap-json strategy toolbar actions
  • Extended unit tests to verify extension registration and text-align actions
  • Updated JSON serialize test expectation to include attrs.textAlign: null on paragraph nodes

Related Issue

  • Fixes N/A

How Has This Been Tested?

  • test environment: local development environment (macOS), pnpm + Vitest
  • test case 1: verify tiptap-json strategy includes textAlign extension
  • test case 2: verify text-align group exposes all four alignment actions
  • test case 3: verify serialization output for paragraph includes textAlign attribute
  • pnpm test:unit --run packages/web-pkg/tests/unit/editor/strategies/tiptapJson.spec.ts

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@AlexAndBear
AlexAndBear merged commit 781ad6c into main Aug 21, 2026
31 checks passed
@AlexAndBear
AlexAndBear deleted the feat/tiptap-json-text-align branch August 21, 2026 09:20
@openclouders openclouders mentioned this pull request Aug 21, 2026
1 task
@github-project-automation github-project-automation Bot moved this to Qualification in OpenCloud Team Board Aug 21, 2026
@github-project-automation github-project-automation Bot moved this from Qualification to Done in OpenCloud Team Board Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants