Skip to content

creating multiple layers of StyleSpans for the StyledTextArea #151

@pnixon

Description

@pnixon

I would like to create a regex text highlighter using your RichTextFX that will highlight the same document on multiple separate lines with multiple regular expressions. I am running into an issue where when I run StyleSpansBuilder.create() I cannot then put another layer on top. I have also tried creating multiple stylespansbuilders but only one will show at a time.

The problem with running multiple regular expressions with a single stylespansbuilder is that each match after the first is assumed to be after the previous match, I assume this is probably to ensure that overlap doesn't happen accidentally, but this is actually behavior that I want.

My setup right now is basically a single window with two codeAreas, the top holds multiple lines of regex, the bottom holds the document that the regular expressions are to be run on and highlighted. could you point me in the right direction? I've been trying to make sense of your framework here, but there's enough to keep me busy for weeks trying to figure out exactly how they work.

Thanks, and this RichTextFX is pretty damn cool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions