Exit Full View

Featureful / about / components / TextEditor.md

Text Editor

A tiny wrapper around the built-in TextBehaviour.

There's an old joke :

Emacs is a great operating system that lacks a decent text editor.

Featureful can be mocked in the same way, but for different reasons. Featureful's text editor is very basic, but at least it is usable without a steep learning curve.

(By contrast, Emacs is an incredible text editor). FYI, I don't use it, as I do like GUIs, and never took to time to make use of Emacs's full potential.

Features

  • Basic editing
  • Find and Replace (plain text and regular expressions).
  • Syntax highlighting for Featureful's scripting language Feather.

These features aren't scripted though; they are written in Kotlin.

Potential Improvements/Replacement

The text editor is a script (as are all components), so in theory, it is possible to improve it (or replace it entirely).

However, to do so, you would need to use the GUI Toolkit API. No components do this, and ideally, none should.

I've tried to abstract away the complexities of the GUI Toolkit, to make scripts as simple as possible.

Even relatively simple things, such as syntax highlighting would require accessing the GUI Toolkit directly. An API for syntax highlighting is on my to-do list, but is low priority.

FYI, the GUI Toolkit is Glok. IMHO, Glok is better in many ways to other Java GUI toolkits, such as AWT, Swing and JavaFX. I'm very biased though; I wrote Glok.


Back to Components index.