Summary
Adds LineEnding enum to represent 4 possible cases:
- CR classic Mac
- CRLF Windows
- LF Linux
- (null) platform default
Adds the lineEnding attribute to StyledTextModel via two methods:
- setLineEnding
- getLineEnding
In the CodeArea control, the line endings are expressed via the new lineEnding property.
Problem
The line endings are important in the following operations:
- copy plain text to clipboard
- save plain text (or get plain text)
- IME
Solution
The solution is to provide an attribute to the base model class (StyledTextArea), as well as a property to the control which uses essentially a plain text model (CodeArea).
Specification
See the attached diff file.
- csr of
-
JDK-8370140 RichTextArea: line endings
-
- In Progress
-