<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
To be honest, I think this will create problems when working with
the RichTextArea API. <br>
<br>
Why? Because every developer will intuitively look for setText. For
example, TextArea<br>
—<a class="moz-txt-link-freetext" href="https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/TextArea.html">https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/TextArea.html</a>
— <br>
has setText. CodeArea has setText. But RichTextArea doesn't. <br>
<br>
This doesn't seem very good. But that's just my personal opinion.<br>
<br>
Best regards, Pavel<br>
<br>
<div class="moz-cite-prefix">On 5/1/25 20:32, Kevin Rushforth wrote:<br>
</div>
<blockquote type="cite"
cite="mid:d5c813a8-afc3-4f5e-8601-de2afd119439@oracle.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Note that there is an easy way to set plain text if you are using
a writable model:<br>
<br>
rta.clear();<br>
rta.appendText(String text);<br>
<br>
-- Kevin<br>
<br>
<br>
<div class="moz-cite-prefix">On 5/1/2025 7:55 AM, Andy Goryachev
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:BYAPR10MB3013B4DBD10400C74000E80BE5822@BYAPR10MB3013.namprd10.prod.outlook.com">
<meta name="Generator"
content="Microsoft Word 15 (filtered medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Aptos;
panose-1:2 11 0 4 2 2 2 2 2 4;}@font-face
{font-family:"Iosevka Fixed SS16";
panose-1:2 0 5 9 3 0 0 0 0 4;}@font-face
{font-family:"Times New Roman \(Body CS\)";
panose-1:2 11 6 4 2 2 2 2 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:10.0pt;
font-family:"Aptos",sans-serif;}span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Iosevka Fixed SS16";
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}div.WordSection1
{page:WordSection1;}</style>
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">Intentionally:
the CodeArea model contains plain text, while in the
RichTextArea the content depends on the model. It may not
contain anything and be generated on the fly.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">-andy<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div>
<div
style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span
style="font-size:12.0pt;color:black">From: </span></b><span
style="font-size:12.0pt;color:black">openjfx-dev <a
class="moz-txt-link-rfc2396E"
href="mailto:openjfx-dev-retn@openjdk.org"
moz-do-not-send="true"><openjfx-dev-retn@openjdk.org></a>
on behalf of PavelTurk <a
class="moz-txt-link-rfc2396E"
href="mailto:pavelturk2000@gmail.com"
moz-do-not-send="true"><pavelturk2000@gmail.com></a><br>
<b>Date: </b>Thursday, May 1, 2025 at 05:40<br>
<b>To: </b><a
class="moz-txt-link-abbreviated moz-txt-link-freetext"
href="mailto:openjfx-dev@openjdk.org"
moz-do-not-send="true">openjfx-dev@openjdk.org</a>
<a class="moz-txt-link-rfc2396E"
href="mailto:openjfx-dev@openjdk.org"
moz-do-not-send="true"><openjfx-dev@openjdk.org></a><br>
<b>Subject: </b>RichTextArea: RichTextArea
doesn't have a setText method, but CodeArea does<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span
style="font-size:11.0pt">I've just found out that
RichTextArea doesn't have a setText method, but
CodeArea does.<br>
<br>
Is this a mistake or was it done intentionally?<br>
<br>
Best regards, Pavel<br>
<br>
PS. Just don't think I spend my free time
analyzing Javadoc. It's just that I once opened an
issue in RTFX suggesting<br>
to add a setText method, and today, seeing this
issue, I decided to mention that JavaFX
RichTextArea has such<br>
a method. However, I was surprised not to find it.<br>
<br>
<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>