Add rich-text alignment controls (left/center/right)
Shared RichTextEditor gains @tiptap/extension-text-align for heading and paragraph nodes, serializing alignment as inline text-align on the block node so it round-trips through save/reload. Fixed once at the shared component so it also flows into the upcoming rich_text and two_column page blocks. Server sanitize allowlist now permits `style` on p/h1-h6, constrained by allowedStyles to text-align (left/right/center/justify) only; all other CSS properties and values are stripped. Step 1 of the CMS Page Builder spec. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
"dependencies": {
|
||||
"@tiptap/extension-image": "^2.27.2",
|
||||
"@tiptap/extension-link": "^2.27.2",
|
||||
"@tiptap/extension-text-align": "^2.27.2",
|
||||
"@tiptap/react": "^2.27.2",
|
||||
"@tiptap/starter-kit": "^2.27.2",
|
||||
"diff": "^5.2.2",
|
||||
|
||||
Reference in New Issue
Block a user