Skip to content
JordanMartinez edited this page Sep 16, 2016 · 12 revisions

Welcome to the RichTextFX wiki!

###Some general useful info:

  • RichTextFX: MVVM, not MVC: Although originally designed according to the MVC paradigm, numerous developers had issues with accessing and modifying the view. So, this project now better adheres to the MVVM paradigm:
    • The Model is an EditableStyledDocument.
    • The View is StyledTextArea and its behavior StyledTextAreaBehavior
    • The ViewModel is StyledTextAreaModel.
  • StyledTextArea's viewport: StyledTextArea only displays the lines that need to be displayed. The benefit of this is that, despite having a StyledDocument with thousands of lines, the area will still display these lines efficiently. The downside is that the area does not always know how tall or wide the actual document is. When the area does not wrap lines and the same font size is used throughout the area, then the scrollX and scrollY values are accurate. However, once one of these two restraints is broken, the area's scrollbars can no longer be set accurately. For more information about this downside, see TomasMikula/Flowless.
  • Check out the RichTextFX CSS Reference Guide to change things like the area's font size, highlight the current line in a special way, etc.