On Tue, 14 Jul 2026 14:49:07 GMT, Andy Goryachev <[email protected]> wrote:

>> modules/jfx.incubator.richtext/src/main/java/jfx/incubator/scene/control/richtext/model/RichTextModel.java
>>  line 927:
>> 
>>> 925:                     b.addSegment(text, a);
>>> 926:                 } else {
>>> 927:                     b.addInlineNode(im::createNode, a);
>> 
>> What if an inline node also has a non-empty text string? It looks like this 
>> will silently drop all of the text. Will this cause problems with API that 
>> uses TextPos? Would it be better to split the segment or else throw an error 
>> in this case?
>
> hm, not sure I understand: `addInlineNode()` does not care about the node 
> properties; the model treats it as having a single character (' ', but 
> perhaps it should be '\ufffd').  StyledSegment:307

What happens if you call `applyStyle` to a range of text using a 
`StyleAttributeMap` that contains `StyleAttribute.EMBEDDED_IMAGE`?

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/2196#discussion_r3580099862

Reply via email to