# Javafx Rich Text Documents Editors

> Build JavaFX editor-style applications for rich text, documents, annotation, and file-centric workflows.

- Skill: `johannesrabauer/javafx-rich-text-documents-editors` (Agent Skill)
- Install (CLI): `npx skillmds@latest add johannesrabauer/javafx-rich-text-documents-editors`
- Raw SKILL.md: https://api.skillmd.com/api/skills/johannesrabauer/javafx-rich-text-documents-editors/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: JohannesRabauer (https://skillmd.com/u/johannesrabauer)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/johannesrabauer/javafx-rich-text-documents-editors

---


# JavaFX Rich Text, Documents, and Editors

Use this skill when the application behaves like an editor: document tabs, preview panes, annotation
surfaces, search, undo/redo, or export-oriented workflows.

## Example

```java
import javafx.geometry.Orientation;
import javafx.scene.control.ListView;
import javafx.scene.control.TextArea;
import javafx.scene.control.ToolBar;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.SplitPane;

public class EditorShell extends BorderPane {

    public EditorShell() {
        var files = new ListView<String>();
        files.getItems().addAll("notes.md", "draft.txt", "summary.adoc");

        var editor = new TextArea();
        var preview = new TextArea();
        preview.setEditable(false);

        editor.textProperty().addListener((obs, oldValue, newValue) -> preview.setText(newValue));

        var split = new SplitPane(editor, preview);
        split.setOrientation(Orientation.HORIZONTAL);

        setTop(new ToolBar());
        setLeft(files);
        setCenter(split);
    }
}
```

## Setup notes

- Plan for undo, selection, clipboard, file IO, and persistence from the beginning.
- Add libraries such as RichTextFX, RichTextArea, or PDF/document viewers only when the editing
  model truly requires them.
- Keep preview generation and document parsing off the FX thread.

## Gotchas

- Editor-style apps quickly need stable workspace state, not just a central text area.
- Annotation and diagram tools depend on hit-testing, transforms, and zoom behavior.
- Preview panes and export pipelines can hide expensive background work if they update too eagerly.

