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

RichTextFX: Highlighting a Word in StyleClassedTextArea not working

I am new to RichTextFX and need some help. I want to use StyleClassedTextArea (see https://github.com/FXMisc/RichTextFX). My simple java code: public class GuiMain extends Application { @Override public void start(Stage primaryStage) throws…
zitrusire2520
  • 180
  • 2
  • 11
1
vote
1 answer

JavaFX - RichTextFX - How to change highlight text color

I am using an instance of RichTextFX's StyleClassedTextArea, but can't seem to change the color of the text itself while highlighting. There is a similar question: RichTextFx change selected text color and line number background which has helped me,…
1
vote
1 answer

RichTextFx not working in JavaFX, CodeArea not not showing up (Errors)

My build configs This is my code: MenuBar menuBar = new MenuBar(); Menu menu1 = new Menu("File"); Menu menu2 = new Menu("Edit"); Menu menu3 = new Menu("Project"); Menu menu4 = new Menu("Window"); Menu menu5 = new…
1
vote
0 answers

Error: Missing JavaFX application class TextEditor with RichTextFX

This is the image error! I checked out many sources on how to fix this problem! I am using Java 15, and I have the RichTextFX jar file version 0.10.6 installed. I am getting this error but I do not know why, as according to documentations I am doing…
1
vote
1 answer

RichTextFX line numbers column extended for entire text area

Could someone tell me how to implement RichTextFX CodeArea with line numbers section extended till the end of the area? This is how it looks like now: I don't need line numbers after line 12 but I would like to see this grey bar to fill the entire…
sew
  • 11
  • 1
1
vote
1 answer

RichTextFX's undo is not working properly

Whenever, I type something in CodeArea and press CTRL + Z and then begin typing again, the cursor gets reset to the start of the text. I looked into this issue https://github.com/FXMisc/RichTextFX/issues/761 and seems like this bug is fixed.…
THe_strOX
  • 687
  • 1
  • 5
  • 16
1
vote
1 answer

Implementing save/open with RichTextFX?

Here is my code: private void save(File file) { StyledDocument, LinkedImage>, TextStyle> doc = textarea.getDocument(); // Use the Codec to save the document in a binary format …
Dan
  • 1,163
  • 3
  • 14
  • 28
1
vote
0 answers

RichTextFX set text value of CodeArea

I'm just starting to use RichTextFX, and I'm trying to replace a TextArea with a CodeArea. Now TextArea has a setText() method, but I don't see anything analogous to that in CodeArea. How can I set the text of my CodeArea?
Steve
  • 4,457
  • 12
  • 48
  • 89
1
vote
1 answer

passing objects as arguments using namedArg annotation in javafx 8

how do one pass a non-string object as argment using @namedArg in javafx? I cannot find a single nutshell example regarding this question online! I am currently trying to instantiate a InlineCssTextArea from RichTextFX wrapped in a…
Adrian
  • 11
  • 2
1
vote
0 answers

Adding a custom JavaFX control to Scenebuilder

Currently, i'm building a project within FXML and would like to make use of a custom RichTextFX Java class within SceneBuilder 2.0. I know that it will involve the use of custom controls however I'm currently confused on what steps I'll need to…
1
vote
0 answers

Java Regex For Lines Starting with -, +, < , >

I am working on a text area which supports syntax highlighting (based on RichTextFX). As i was trying to create regex to highlight syntax of Diff files, i am unable to highlight more than one lines using ^ like this in ADDITION_PATTERN =…
DeepSidhu1313
  • 805
  • 15
  • 31
1
vote
0 answers

How to save text along with styling from RichTextFX StyleClassedTextArea?

I need to save the text from StyleClassedTextArea in a variable along with its styling so that i can populate the StyleClassedTextArea with the same styled text later String text = styleClassedTextArea.getText(); This only saves the plain text I…
Rahul Yadav
  • 2,627
  • 5
  • 30
  • 52
1
vote
2 answers

RichTextFX StyleClassedTextArea padding

I am using StyleClassedTextArea like a textbox with styles in my app However the text inside StyleClassedTextArea doesn't appear to be properly padded on all sides like it does in the textbox StyleClassedTextArea Textbox: I have tried…
Rahul Yadav
  • 2,627
  • 5
  • 30
  • 52
1
vote
0 answers

InlineCssTextArea (RichTextFX) current style?

I'm trying to achieve something like rich text editor in javafx, using RichTextFX library component: InlineCssTextArea. I've expect an API similar to this: InlineCssTextArea area = new InlineCssTextArea(); area.setStyle("-fx-font-weight:…
Dejwi
  • 4,393
  • 12
  • 45
  • 74
1
vote
1 answer

RichTextFx: How to add binding to StyleClassedTextArea

Forgive me if what I ask is obvious but I can't figure out how to create a binding in a StyleClassedTextArea, using RichTextFx. What I want to do is to have the area and a button (that will trigger text-processing of some kind) and disable the…
Yannis P.
  • 2,745
  • 1
  • 24
  • 39