Questions tagged [richtextfx]

Rich text editing component for JavaFX.

RichTextFX provides a text area for JavaFX with API to style ranges of text. It is intended as a base for rich-text editors and code editors with syntax highlighting.

58 questions
1
vote
1 answer

How to add individual lines dynamically with different styles using a RichTextFX control

I am using the RichTextFX control found here https://github.com/TomasMikula/RichTextFX. I am trying to create a server Log with different lines having different styles. For example if a line is telling the user good news such as a success the line…
Maspe36
  • 356
  • 5
  • 12
1
vote
1 answer

How can I use True Type Collection (.ttc) in JavaFX?

I've successfully loaded .ttf fonts in CSS in my application. When I try to load .ttc for international language support, I get this Jun 08, 2015 10:12:44 AM com.sun.javafx.css.StyleManager loadStylesheetUnPrivileged INFO: Could not load @font-face…
Tengyu Liu
  • 1,223
  • 2
  • 15
  • 36
1
vote
1 answer

Scroll Position in RichTextFX

I'm using RichTextFX for a project, and want to add a Canvas to the background of the CodeArea in RichTextFX. I've done so, but I haven't been able to find a way to make it scroll with the CodeArea itself. Is there a way to get the scroll position…
Salman Arif
  • 105
  • 5
0
votes
1 answer

How do you get a paragraph number for a given position in a RichTextFX CodeArea?

Specifically I want to know the starting and ending lines of the user's current selection. The positions in the text are available from the selection, as in: IndexRange selection = editor.getSelection(); int startPos = selection.getStart(); int…
swpalmer
  • 3,890
  • 2
  • 23
  • 31
0
votes
0 answers

How to get notified when changes in the document actually happens?

The following question is about RichTexFX. For standard JavaFX components, I've never had this issue before. In my application, I am adding text content to the end of a GenericStyledArea (actually a subclass of it, but that should have no impact on…
Elias Mårtenson
  • 3,820
  • 23
  • 32
0
votes
0 answers

How to make text blink using JavaFX CSS?

Here I found a question with answers how to make label blink programmatically. However, I need to make my text blink in RichTextFX. So, I need a solution that can provide this functionality using only CSS. I tried this: .my-class { …
Pavel_K
  • 10,748
  • 13
  • 73
  • 186
0
votes
1 answer

How to make outer pane scroll instead of inner one

Firstly, as you probably noticed in tags, I use RichTextFX. CodeArea is just its text area with some features. I have ScrollPane with inner elements: ScrollPane | AnchorPane | | VBox | | | HBox | | | | Label | | | | …
Lizurt
  • 15
  • 1
  • 7
0
votes
0 answers

Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: This ParagraphText is not the parent of the given shape

In the listener when I detect double click in treeview, I cannot receive the caret bounds of the codearea for some reason. It bugs out saying this -> Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: This…
0
votes
1 answer

RichTextFX CodeArea Force Caret to Last Paragraph

I'm designing a cmd like console I want to force the caret to last line so that previous line wont be editable. codeArea.currentParagraphProperty().addListener((obs, o, n) -> codeArea.moveTo(codeArea.getLength())); I used the above statement to…
0
votes
1 answer

How to implement RichTextFX in JavaFX project

I started to work on a JavaFX project in which I want to add a copied text without to change the format and images from my driver (it should work like open office). The images should be able to be placed within the text on different…
Sloth
  • 11
  • 1
  • 4
0
votes
1 answer

How can I change the displayed tab width in JavaFX with RichTextFX?

I'm writing a text editor in JavaFX with the RichTextFX library and when I write a tab it has a width of 8. How can I change this without replacing the tab with e.g. 4 whitespaces? This is what I have at the moment: Nodes.addInputMap(this.codeArea,…
0
votes
0 answers

How to highlight some words from a custom dictionnnary using CodeArea from RichTextFx

What I want to do is pretty simple in my head, but might be very hard to do. Currently, I did set up RichTextFx in my JavaFX project and created a code area. What I'd like to do is make some words a certain color depending on a custom dictionary…
SkyCrafter
  • 21
  • 3
0
votes
1 answer

problem with append text with style in richtextfx

i want to append specific text with style in StyleClassedTextArea in richtextfx using method append(String text, String sytleClass) but there was a problem StyleClassTextArea textarea=new…
Logesh-0304
  • 109
  • 9
0
votes
0 answers

RichTextFX, part of document content readonly

I'm using RichTextFX to implement a commandline interface. What this means is that only the last line of text should be editable, while the previous content should be readonly. Is there a way to mark a given span as readonly? If not, what is the…
Elias Mårtenson
  • 3,820
  • 23
  • 32
0
votes
1 answer

Unable to add text to InlineCssTextArea in RichTextFX

I am new to use the RichTextFX for my JAVAFX project. But I find that I cannot add the text to the InlineCssTextArea. In the project I used the MVC design and generate the UI code from the Scene Builder. The InlineCssTextArea is succesfully created…
Hyper
  • 1
  • 1
  • 2