<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div dir="ltr" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Dear Jurgen:</div>
<div dir="ltr" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
It is possible to add a Node to the content, but needs a custom model (see SimpleViewOnlyStyledModel:488).</div>
<div dir="ltr" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Also, what does it mean to copy a content with a Node, especially an interactive one, like a TextField? This question cannot be answered generally, as it depends on the application requirements, thus the custom model.</div>
<div dir="ltr" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Having said that, there might still be a need to provide the necessary protected APIs as you suggested. I've added a note to
<a href="https://bugs.openjdk.org/browse/JDK-8365948" data-outlook-id="2ab786ea-49ad-451f-bb90-9a40c336128a">
https://bugs.openjdk.org/browse/JDK-8365948</a></div>
<div dir="ltr" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks!</div>
<div dir="ltr" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
-andy</div>
<div dir="ltr" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="mail-editor-reference-message-container">
<div class="ms-outlook-mobile-reference-message skipProofing">
<meta name="Generator" content="Microsoft Exchange Server">
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="text-align: left; padding: 3pt 0in 0in; border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor; font-family: Aptos; font-size: 12pt; color: black;">
<b>From: </b>Jurgen Doll <jurgen@ivoryemr.co.za><br>
<b>Date: </b>Monday, November 3, 2025 at 01:53<br>
<b>To: </b>Andy Goryachev <andy.goryachev@oracle.com><br>
<b>Cc: </b>openjfx-dev <openjfx-dev@openjdk.org><br>
<b>Subject: </b>[External] : Re: RichTextArea Feedback<br>
<br>
</div>
<div class="PlainText" style="font-size: 11pt;">Hi Andy<br>
<br>
Thanks for posting a summary to the dev list.<br>
<br>
With regards to this point:<br>
<br>
>> As expected though paste and undo/redo don't work due to<br>
> StyledTextModel's final replace method not handling INLINE_NODE's<br>
> <br>
> This is correct, and I think it might be better to leave up to the<br>
> (custom) model. The reason for it is it should be up to the<br>
> application/custom model to decide how to deal with the embedded<br>
> nodes, especially interactive ones.<br>
<br>
I understand your rational, however having tried it myself (with two<br>
different models) I can claim with a high degree of confidence that it's<br>
currently impossible. Unless I've missed something, a developer<br>
extending any form of StyledTextModel cannot accomplish this.<br>
<br>
The fix if I'm not mistaken is straightforward. What is required is<br>
the addition of something like the following method to StyledTextModel:<br>
<br>
protected abstract int insertNodeSegment(int index, int offset,<br>
Supplier<Node> sup, StyleAttributeMap? attrs?);<br>
<br>
and that the method:<br>
<br>
public final TextPos replace(..., StyledInput input)<br>
<br>
then handles INLINE_NODE and appropriately invokes this added<br>
insertNodeSegment method.<br>
<br>
All your current sub-classes of StyledTextModel can then just implement<br>
No-Op implementations of insertNodeSegment. Of course it would be<br>
awesome if RichTextModel could handle inline nodes out of the box.<br>
<br>
I hope this meets with your approval and if I've missed something please<br>
let me know.<br>
<br>
Thanks, regards<br>
Jurgen<br>
<br>
</div>
</div>
</body>
</html>