fix: preserve line breaks in text element rendering (#461)

- Change whiteSpace from 'nowrap' to 'pre-wrap' in preview panel
- Allows multi-line text content to display correctly
- Maintains existing text wrapping behavior
This commit is contained in:
Eshan Das 2025-08-03 17:14:23 +05:30 committed by GitHub
parent c0651fec19
commit b52a9ca3e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -381,7 +381,7 @@ export function PreviewPanel() {
textDecoration: element.textDecoration,
padding: "4px 8px",
borderRadius: "2px",
whiteSpace: "nowrap",
whiteSpace: "pre-wrap",
// Fallback for system fonts that don't have classes
...(fontClassName === "" && { fontFamily: element.fontFamily }),
}}