<div>Whoops, my bad - trying to respond quickly before going to sleep.</div><br><div>However even here both embedded attributes and inline styles should be allowed as the embedded attributes don't cover all possible CSS attributes. I actually used a "-fx-effect" style in my experimentation with RichTextArea to indicate misspelled words. Another benefit to allowing this is that if it would enable the use of any future CSS attributes that may be added without having to change RichTextArea.</div><br><div>Granted attribute duplication is possible so maybe throwing an exception is an option or just noting it in the JavDoc ?</div><br><div>Btw if I'm not mistaken adding INLINE_STYLE and STYLE_NAMES would probably do way with the need for the <font style="font-size:14.5px"><font style="font-family:Nylas-Pro, Helvetica, "Lucidia Grande", sans-serif">CssStyles class.</font></font></div><br><div><font style="font-size:14.5px"><font style="font-family:Nylas-Pro, Helvetica, "Lucidia Grande", sans-serif">Regards</font></font></div><div><font style="font-size:14.5px"><font style="font-family:Nylas-Pro, Helvetica, "Lucidia Grande", sans-serif">Jurgen</font></font></div><br><br><div class="gmail_quote_attribution">On Aug 26 2025, at 9:41 pm, Andy Goryachev <andy.goryachev@oracle.com> wrote:</div><blockquote><div><font style="font-size:12pt"><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif">What I meant is if you try to mix embedded styles (such as StyleAttributeMap.BOLD for instance) and explicit inline styles (such as "-fx-font-weight"), the result is unpredictable because they both try to set inline style when rendering paragraphs.</font></font></div><div><br></div><div><font style="font-size:12pt"><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif">So the model must either provide embedded attributes (BOLD), or inline styles, but not both.  Style names can be used in both cases, since inline styles have higher priority.</font></font></div><div><br></div><div><font style="font-size:12pt"><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif">-andy</font></font></div><div><br></div><div><br></div><div><br></div><div><div class="ms-outlook-mobile-reference-message skipProofing"><div><font style="font-size:12pt"><font style="font-family:Aptos"><strong>From: </strong></font></font><font style="font-size:12pt"><font style="font-family:Aptos">Jurgen Doll <jurgen@ivoryemr.co.za></font></font></div><div><font style="font-size:12pt"><font style="font-family:Aptos"><strong>Date: </strong></font></font><font style="font-size:12pt"><font style="font-family:Aptos">Tuesday, August 26, 2025 at 12:34</font></font></div><div><font style="font-size:12pt"><font style="font-family:Aptos"><strong>To: </strong></font></font><font style="font-size:12pt"><font style="font-family:Aptos">Andy Goryachev <andy.goryachev@oracle.com>, openjfx-discuss@openjdk.org <openjfx-discuss@openjdk.org></font></font></div><div><font style="font-size:12pt"><font style="font-family:Aptos"><strong>Subject: </strong></font></font><font style="font-size:12pt"><font style="font-family:Aptos">Re: [External] : RichTextArea styling feedback</font></font></div><br></div><div class="ms-outlook-mobile-reference-message skipProofing">Hi Andy</div><div class="ms-outlook-mobile-reference-message skipProofing"><br></div><div class="ms-outlook-mobile-reference-message skipProofing">I think they should both be allowed at the same time, with a reminder in the JavaDoc that the same rules apply as usual styling using setStyle and getStyleClass. In my own application I generally use the latter by default but I do also sometimes mix it with setStyle. If I remember correctly the rule is that CSS attributes set via setStyle overrides any of those attributes that were specified via a style class. So I don't think there's a need to make them mutually exclusive.</div><div class="ms-outlook-mobile-reference-message skipProofing"><br></div><div class="ms-outlook-mobile-reference-message skipProofing">Regards</div><div class="ms-outlook-mobile-reference-message skipProofing">Jurgen</div><div class="ms-outlook-mobile-reference-message skipProofing"><br></div><div class="gmail_quote_attribution">On Aug 26 2025, at 9:01 pm, Andy Goryachev <andy.goryachev@oracle.com> wrote:</div><div class="ms-outlook-mobile-reference-message skipProofing"><br></div><blockquote><div class="ms-outlook-mobile-reference-message skipProofing"><font style="font-size:12pt"><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif">Thanks!  A though was nagging at me to basically fold the CSS style names into an attribute like you suggested.  The main reason I decided to hide it was that the two styling methods (css vs embedded attributes) are two separate, almost mutually exclusive modes.</font></font></div><div class="ms-outlook-mobile-reference-message skipProofing"><br></div><div class="ms-outlook-mobile-reference-message skipProofing"><font style="font-size:12pt"><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif">In fact, the embedded styles end up as inline styles, so it makes little sense to allow both to be active at the same time, as there is no way to guarantee the end result.</font></font></div><div class="ms-outlook-mobile-reference-message skipProofing"><br></div><div class="ms-outlook-mobile-reference-message skipProofing"><font style="font-size:12pt"><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif">Nevertheless, it's a good opportunity to give it another thought.</font></font></div><div class="ms-outlook-mobile-reference-message skipProofing"><br></div><div class="ms-outlook-mobile-reference-message skipProofing"><font style="font-size:12pt"><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif">Thanks!</font></font></div><div class="ms-outlook-mobile-reference-message skipProofing"><font style="font-size:12pt"><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif">-andy</font></font></div><div class="ms-outlook-mobile-reference-message skipProofing"><font style="font-size:16px"><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif"> </font></font></div><div class="ms-outlook-mobile-reference-message skipProofing"><br></div><div class="ms-outlook-mobile-reference-message skipProofing"><font style="font-size:12pt"><font style="font-family:Aptos"><strong>From: </strong></font></font><font style="font-size:12pt"><font style="font-family:Aptos">Jurgen Doll <jurgen@ivoryemr.co.za></font></font></div><div class="ms-outlook-mobile-reference-message skipProofing"><font style="font-size:12pt"><font style="font-family:Aptos"><strong>Date: </strong></font></font><font style="font-size:12pt"><font style="font-family:Aptos">Tuesday, August 26, 2025 at 11:46</font></font></div><div class="ms-outlook-mobile-reference-message skipProofing"><font style="font-size:12pt"><font style="font-family:Aptos"><strong>To: </strong></font></font><font style="font-size:12pt"><font style="font-family:Aptos">Andy Goryachev <andy.goryachev@oracle.com></font></font></div><div class="ms-outlook-mobile-reference-message skipProofing"><font style="font-size:12pt"><font style="font-family:Aptos"><strong>Subject: </strong></font></font><font style="font-size:12pt"><font style="font-family:Aptos">Re: [External] : RichTextArea styling feedback</font></font></div><div class="ms-outlook-mobile-reference-message skipProofing"><br></div><div class="ms-outlook-mobile-reference-message skipProofing">Hi Andy</div><div class="ms-outlook-mobile-reference-message skipProofing"><br></div><div class="ms-outlook-mobile-reference-message skipProofing">In RichParagraph.Builder there is addWithInlineStyle which maps to Node.setStyle( String ), and then also addWithStyleNames which maps to Node.getStyleClass().add( String ).</div><div class="ms-outlook-mobile-reference-message skipProofing"><br></div><div class="ms-outlook-mobile-reference-message skipProofing">Yes, they're mapped to CssStyles and can stay a hidden implementation detail.</div><div class="ms-outlook-mobile-reference-message skipProofing"><br></div><div class="ms-outlook-mobile-reference-message skipProofing">Regards</div><div class="ms-outlook-mobile-reference-message skipProofing">Jurgen</div><div class="ms-outlook-mobile-reference-message skipProofing"><br></div><div class="gmail_quote_attribution">On Aug 26 2025, at 8:31 pm, Andy Goryachev <andy.goryachev@oracle.com> wrote:</div><blockquote><div class="ms-outlook-mobile-reference-message skipProofing"><font style="font-size:12pt"><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif">Dear Jurgen:</font></font></div><div class="ms-outlook-mobile-reference-message skipProofing"><br></div><div class="ms-outlook-mobile-reference-message skipProofing"><font style="font-size:12pt"><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif">Thanks again for the feedback, here are the new JBS tickets:</font></font></div><div class="ms-outlook-mobile-reference-message skipProofing"><br></div><div class="ms-outlook-mobile-reference-message skipProofing"><font style="font-size:12pt"><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif"><u><a href="https://bugs.openjdk.org/browse/JDK-8366198" title="https://bugs.openjdk.org/browse/JDK-8366198">JDK-8366198</a></u></font></font><font style="font-size:12pt"><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif"> RichTextArea: consider new attributes in StyleAttributeMap (INLINE_STYLE, STYLE_NAMES, TEXT_HIGHLIGHT, and WAVY_UNDERLINE)</font></font></div><div class="ms-outlook-mobile-reference-message skipProofing"><font style="font-size:12pt"><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif"><u><a href="https://bugs.openjdk.org/browse/JDK-8366201" title="https://bugs.openjdk.org/browse/JDK-8366201">JDK-8366201</a></u></font></font><font style="font-size:12pt"><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif"> RichTextArea: add undo parameter to applyStyle/setStyle</font></font></div><div class="ms-outlook-mobile-reference-message skipProofing"><font style="font-size:12pt"><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif"><u><a href="https://bugs.openjdk.org/browse/JDK-8366202" title="https://bugs.openjdk.org/browse/JDK-8366202">JDK-8366202</a></u></font></font><font style="font-size:12pt"><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif"> RichTextArea: wrong style used for typed text</font></font></div><div class="ms-outlook-mobile-reference-message skipProofing"><br></div><div class="ms-outlook-mobile-reference-message skipProofing"><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif"><font style="font-size:12pt">Question - what exactly do you mean by </font></font><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif"><font style="font-size:16px">INLINE_STYLE?</font></font></div><div class="ms-outlook-mobile-reference-message skipProofing"><br></div><div class="ms-outlook-mobile-reference-message skipProofing"><font style="font-size:16px"><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif">I assume STYLE_NAMES are basically the public equivalent of CssStyles.CSS (which I decided to hide as an implementation detail in the first iteration)?</font></font></div><div class="ms-outlook-mobile-reference-message skipProofing"><br></div><div class="ms-outlook-mobile-reference-message skipProofing"><font style="font-size:12pt"><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif">Thanks!</font></font></div><div class="ms-outlook-mobile-reference-message skipProofing"><font style="font-size:12pt"><font style="font-family:"Iosevka Fixed SS16", Arial, Helvetica, sans-serif">-andy</font></font></div></blockquote></blockquote></div></blockquote>