Releases: FXMisc/RichTextFX
v0.8.0
0.7 Milestone 5
0.7 Milestone 4
Regression
- When user types a key to insert a character into the document, the caret is not moved to be in front of that just-inserted character. Instead, the caret stays at its original position, reversing any inserted words/phrases via user keyboard input (See #472). To work around this, override the
replace
method:
public void replace(int from, int to, StyledDocument<PS, SEG, S> document) {
if (from == to && document.length() == 0) {
return; // ignore changes that do nothing. Or TextChange throws IllegalArgumentException
}
super.replace(from, to, document);
int newCaretPos = getCaretPosition() + document.length();
selectRange(newCaretPos, newCaretPos);
}
New features
- Expose API for "scroll[X/Y]By" to scroll view by specific amount
- Add "show()" methods to force viewport to display a specific line at top, bottom or within viewport
- Better support multi-line wrapped paragraphs API
- Added method to get the number of lines a wrapped multi-line paragraph spans
- Renamed "line" methods to "paragraph" methods and implement actual "line" methods
- Shift + Home/End moves caret to start of line, not paragraph
- Add API for caret/selection bounds on screen
- All areas are now FXML-ready
Fixed Bugs
- Fixed "-fx-highlight-fill" CSS issue
- Fixed "-fx-caret-blink-rate" CSS issue
- Fixed regression: RTFX supports ContextMenu as before
- Fixed horizontal scrollbar not working issue
- Fixed Exception thrown when trying to merge a change that inserts text with a change that deletes that text
- Fixed LineNumberFactory's type to use base area (GenericStyledArea) rather than StyledTextArea
Refactoring or Updates
- Default mouse behavior has been reconfigured to be more overridable-friendly. See
GenericStyledArea
's javadoc for details. - Javadoc to Flowless & ReactFX links have been fixed
- ".virtual-flow" removed from "styled-text-area.css"
- "positionCaret()" has been renamed to "displaceCaret()" and its javadoc better clarifies what it does
- Popup API fully deprecated
- ReadMe updated & dead links fixed
- RichText demo updated to use interface for better memory usage
0.7 Milestone 3
Major addition in this milestone is support for custom inline objects.
0.7 Milestone 2
- Moved model classes into a separate package.
- Support for styled underline.
- Support for custom caret visibility criteria.
- Exposed
SimpleEditableStyledDocument
, the default implementation ofEditableStyledDocument
. - CSS properties introduced by RichTextFX renamed to start with
-rtfx
. - Added convenience methods using row/col coordinates.
Thanks to all the contributors!
0.7 Milestone 1
Major changes:
- Support for paragraph-level styles.
- Not using JavaFX skin architecture anymore. We came to the conclusion that skins bring more problems than benefits for non-trivial controls. Not using skins will allow us to add/expose more view-related features.
- The scroll-pane has been decoupled from the main content. To get scroll-bars, one now needs to wrap
StyledTextArea
in aVirtualizedScrollPane
. - We moved to a new version of WellBehavedFX, 0.3. This changes the way event handlers are overridden. Please refer to a demo for an example.
- It is now possible to use custom implementation of
EditableStyledDocument
(the content model ofStyledTextArea
). This provides better support for cases when your internal content is richer than just a list of styled paragraphs (e.g. abstract syntax tree). We expect more work to be done to ease the implementation of customEditableStyledDocument
s.
There are additional smaller fixes and new features.
Thanks to the contributors @JordanMartinez, @MewesK, @jobernolte.
0.6.10 Release
0.6.9 Release
New
StyleSpans#overlay method for overlaying two StyleSpans.
Changed
Updated to UndoFX 1.2
Fixed
#179
0.6.8 Release
Resolved tickets: #17, #135, #141.
This release simplifies line terminator handling by internally using only "\n". This has the effect that the text returned from a StyledTextArea might have different line terminators than the inserted text.
This release is not binary compatible with previous releases, but will be binary and source compatible for most users, except for those who directly create or manipulate paragraphs with line terminators.