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, InputMap.consume(EventPattern.keyPressed(KeyCode.TAB), e -> {
this.codeArea.replaceSelection(" ");
}));
It replaces a tab with 4 whitespaces but how can I make that one tab is displayed with a width of 4 whitespaces?
Thank you for answering!