JDK-8351878 : RichTextArea: copy/paste issues
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: jfx25
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-03-12
  • Updated: 2025-04-10
  • Resolved: 2025-04-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
jfx25 b12Fixed
Related Reports
Relates :  
Description
Steps to reproduce:

1. Open the attached "RichTextArea_Demo.docx" file in Microsoft Word
2. In Word: "Select-All" then "Copy"
3. Launch the "RichEditor Demo": `ant run-richeditor-demo`
4. Click in the RichEditor Demo Window to get focus
5. Paste

BUG: The text will be pasted, but the formatting will be lost

See the attached screenshot.

This only happens with the RTF import. When copying the same text from the RichTextArea Demo (which I used as the original source to generate the .docx file), and paste it into the RichEditor Demo window, which uses an internal format, it works as expected.

Also, HTML copy suffered from the following issues:

- incorrect font size
- incorrect handling of boolean character attributes (bold, italic, etc.)

These issues become apparent when copying from RTE to MS Outlook, which prioritizes the HTML over RTF.
Comments
Changeset: 1b26b66e Branch: master Author: Andy Goryachev <angorya@openjdk.org> Date: 2025-04-07 15:59:15 +0000 URL: https://git.openjdk.org/jfx/commit/1b26b66ee984462825263c896ea86f502e5fd269
07-04-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jfx/pull/1735 Date: 2025-03-13 21:58:16 +0000
13-03-2025

Also, Arabic symbols did not import correctly.
12-03-2025