<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hey Andy and others,</p>
<p>from my perspective as an application developer, I would look for
providing an abstract but robust implementation that would allow
anyone to implement such a concrete rich text field without any
roadblocks. Maybe even going as far as going for a more abstract
implementation than text areas. I.e. allowing you to define any
kind of data model class which can be flexibly represented by a
set of compound nodes and controls and can update and reflect the
model state dynamically.<br>
<br>
I think that way you would also get a few more people on board who
are not currently longing for a rich text area because they are
either satisfied with the existing solutions or their applications
that they typically work with do not use them. If such a work
effort could benefit more areas of JavaFX than just rich text
editing, people would be happy to jump on board.<br>
<br>
Instead of creating a RichParagraph.Builder, why not create a more
generic CompoundControlSegment.Builder, CompoundControl.Builder,
CompoundControl, etc.? I.e. being able to easily add arbitrary
nodes and controls in segments/lines, also allowing for an easy
way to set style classes and inline styles. Being able to bind
each node's contents to part of the data model, having some
undo/redo functionality for this model. The StyledAttribute and
StyleHandlerRegistry concept can also be applied to more than just
text areas. And also the idea of the ConfigurationParameters to
allow for an easy but custom handling of other things such as
scrollbars for the resulting compound control. This would allow
developers to use these same principles for other implementations
as well, for example creating forms. And I can definitely find
some use for such a concept in other places far away from text
areas as well.<br>
<br>
The proposed actual rich text area can then still be included as a
concrete implementation of this absraction.</p>
<p>Best<br>
Christopher Schnick<br>
</p>
<div class="moz-cite-prefix">On 21/02/2024 19:07, Andy Goryachev
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:BL3PR10MB6185D054232AEE40C10F1DA5E5572@BL3PR10MB6185.namprd10.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<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:"Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}@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;}@font-face
{font-family:"\@Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}@font-face
{font-family:"Iosevka Fixed SS16 Light";
panose-1:2 0 4 9 3 0 0 0 0 4;}@font-face
{font-family:AppleSystemUIFont;
panose-1:2 11 6 4 2 2 2 2 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Iosevka Fixed SS16";
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}div.WordSection1
{page:WordSection1;}</style>
<div class="WordSection1">
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16 Light"">Dear
JavaFX developers:<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16 Light""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16 Light"">We
would like to propose a new feature - rich text control,
RichTextArea, intended to bridge the functional gap with
Swing and its StyledEditorKit/JEditorPane. The main design
goal is to provide a control that is complete enough to be
useful out-of-the box, as well as open to extension by the
application developers.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16 Light""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16 Light"">This
is a complex feature with a large API surface that would be
nearly impossible to get right the first time, even after an
extensive review. We are, therefore, introducing this in an
incubating module, <b>javafx.incubator.richtext</b>. This
will allow us to evolve the API in future releases without
the strict compatibility constraints that other JavaFX
modules have.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16 Light""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16 Light"">Please
take a look at the proposal [0], a list of discussion points
[1], and the API Specification (javadoc) [2]. While the
proposed API is ready for review, it isn't complete nor set
in stone. We are looking for feedback, and will update the
proposal based on the suggestions we receive from the
community. We encourage you to comment either in the
mailing list, or by leaving comments inline in a draft pull
request [3]. For context, the links to the original RFE [4]
and a list of missing APIs related to rich text [5] are
provided below.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16 Light""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16 Light"">Sincerely,<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16 Light"">Your
friendly JavaFX development team.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16 Light""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16 Light""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16 Light"">References<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16 Light""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16 Light""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16 Light"">[0]
Proposal:
<a
href="https://github.com/andy-goryachev-oracle/Test/blob/rich.jep.review/doc/RichTextArea/RichTextArea.md"
moz-do-not-send="true" class="moz-txt-link-freetext">
https://github.com/andy-goryachev-oracle/Test/blob/rich.jep.review/doc/RichTextArea/RichTextArea.md</a><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16 Light"">[1]
Discussion points:
<a
href="https://github.com/andy-goryachev-oracle/Test/blob/rich.jep.review/doc/RichTextArea/RichTextAreaDiscussion.md"
moz-do-not-send="true" class="moz-txt-link-freetext">
https://github.com/andy-goryachev-oracle/Test/blob/rich.jep.review/doc/RichTextArea/RichTextAreaDiscussion.md</a><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16 Light"">[2]
API specification (javadoc):
<a
href="https://cr.openjdk.org/~angorya/RichTextArea/javadoc"
moz-do-not-send="true" class="moz-txt-link-freetext">https://cr.openjdk.org/~angorya/RichTextArea/javadoc</a><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16 Light"">[3]
Draft Pull Request for API comments and feedback:
<a href="https://github.com/openjdk/jfx/pull/1374"
moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/openjdk/jfx/pull/1374</a><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16 Light""
lang="DE">[4] RichTextArea RFE:
<a href="https://bugs.openjdk.org/browse/JDK-8301121"
moz-do-not-send="true" class="moz-txt-link-freetext">https://bugs.openjdk.org/browse/JDK-8301121</a><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16 Light"">[5]
Missing APIs related to rich text control:
<a href="https://bugs.openjdk.org/browse/JDK-8300569"
moz-do-not-send="true" class="moz-txt-link-freetext">https://bugs.openjdk.org/browse/JDK-8300569</a><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>
</blockquote>
</body>
</html>