title: Directly highlight one text range in RichTextFX
body: <p>I'm currently trying to display the contents of a file in RichTextFX and then highlight a specififc character range on a line with a red background do indicate a problem with this lines.</p>
  
  <p>My code displays everything neatly, but unfortunately I get no highlighting. </p>
  
  <p><strong>code:</strong></p>
  
  <pre><code>    InlineCssTextArea textArea = new InlineCssTextArea();
  
      textArea.setParagraphGraphicFactory(LineNumberFactory.get(textArea));
      textArea.setMinHeight(200.0);
  
      textArea.getStylesheets().add(getClass().getResource("parser.css").toExternalForm());
      try {
          List&lt;String&gt; yourFileLines = Files.readAllLines(file.toPath());
          textArea.replaceText(yourFileLines.stream().collect(Collectors.joining("\n")));
      } catch (IOException e) {
          e.printStackTrace();
      }
      textArea.setStyle(0, 0, 10, "error");
      textArea.setEditable(false);
  </code></pre>
  
  <p><strong>parser.css:</strong></p>
  
  <pre><code>.error {
      -rtfx-background-color: red;
  }
  </code></pre>