Skip to content

fix: Content field styling preserved#492

Merged
surajshetty3416 merged 1 commit intofrappe:developfrom
Hemant-dbit:fix-content-field
Feb 16, 2026
Merged

fix: Content field styling preserved#492
surajshetty3416 merged 1 commit intofrappe:developfrom
Hemant-dbit:fix-content-field

Conversation

@Hemant-dbit
Copy link
Contributor

@Hemant-dbit Hemant-dbit commented Feb 9, 2026

Description

Fixes #489

Text styling (color, italic, bold, underline) is now preserved when editing text through the Content field in the properties panel.

Problem

Previously, editing text via the Content field would strip all formatting, leaving only plain text.

Solution

  • Modified TextBlock.vue to detect plain text input and preserve existing HTML styling
  • Extended TipTap's TextStyle to handle inline style attributes
  • When plain text is entered, only the text content is updated while keeping all HTML tags intact

Testing

  1. Add text block
  2. Apply styling (color, italic, bold, etc.)
  3. Edit text in Content field
  4. Styling is preserved

Before

My.Page._.Builder.-.Google.Chrome.2026-02-15.19-57-20.mp4

After

My.Page._.Builder.-.Google.Chrome.2026-02-15.20-00-37.mp4

@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.61%. Comparing base (9617319) to head (fd6c58d).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #492   +/-   ##
========================================
  Coverage    60.61%   60.61%           
========================================
  Files           28       28           
  Lines         2722     2722           
========================================
  Hits          1650     1650           
  Misses        1072     1072           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@surajshetty3416
Copy link
Member

@Hemant-dbit Can you also a video demonstrating the issue vs fix?

@Hemant-dbit
Copy link
Contributor Author

@surajshetty3416 yes sure

@Hemant-dbit
Copy link
Contributor Author

@surajshetty3416 I have added videos as well demonstrating before and after the issue

@surajshetty3416 surajshetty3416 merged commit 4bae95d into frappe:develop Feb 16, 2026
6 checks passed
@Hemant-dbit Hemant-dbit deleted the fix-content-field branch February 16, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Editing text from 'Content' field strips formatting

2 participants

Comments