Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8370140

RichTextArea: line endings

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • jfx25
    • javafx
    • None
    • Cause Known

      Many programming-oriented editors allow the user to specify/change the end of line characters, for example in Notepad++:

      Edit -> EOL Conversion -> { Windows (CRLF) | Unix (LF) | Macintosh (CR) }

      The line endings setting also comes to play when executing COPY, or calling CodeArea::getText.

      Several possibilities exist:
      1. add the lineEnding property only to CodeArea, use platform default in RTA
      2. add *protected* lineEnding property to RTA with the default value of platform default, and make it public in CodeArea. The problem with this particular idea is that a custom StyledTextModel might have its own ideas how to store the newline, or maybe even allow for mixing different styles in one document.
      3. add a straightforward property to RTA
      4. add property or a field to the StyledTextModel

            angorya Andy Goryachev
            angorya Andy Goryachev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: