Skip to content
TolomerePublic

About

Split View MD Reader/Editor

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

35 Commits

Folders and files

Repository files navigation

SplitMD

A clean, modern Markdown editor built in Java/JavaFX with live split-pane preview. Fully local — no accounts, no telemetry, no internet required.

Features

  • Split-pane editing — raw Markdown on the left, live HTML preview on the right
  • GitHub Flavored Markdown — tables, task lists, strikethrough, fenced code blocks, autolinks
  • Syntax highlighting — color-coded headings, bold, italic, inline code, links, blockquotes, horizontal rules, and task checkboxes
  • Live preview — renders 300ms after last keystroke; scroll position preserved across re-renders
  • Tabbed editing — multiple files open simultaneously with dirty-state indicators (● prefix); new files open scrolled to top
  • Dark & light themes — toggle via toolbar button or Ctrl+Shift+T; light mode is the default; preference persisted across sessions
  • Spell check — English (American) spell checking via LanguageTool 6.4, runs 800ms after typing stops; toggle with F7; personal dictionary persisted in preferences
  • Find & Replace — non-modal slide-in panel (Ctrl+F / Ctrl+H) with case-sensitive, whole-word, and regex support; match highlighting merged with syntax and spell-check layers
  • File management — open, save, save-as; recent files list (max 10); middle-click tab close
  • Session persistence — window size, position, maximized state, theme, splitter position, font size, and personal dictionary restored on relaunch
  • Export — self-contained HTML or PDF via OpenHTMLtoPDF; accessible from toolbar dropdown
  • Status bar — live line/column position, word count, character count, encoding, and line ending display
  • Toolbar — New, Open, Save, Undo, Redo, Theme toggle, Preview toggle, Sync scroll, Export dropdown
  • Application icon — custom icon displayed in the OS taskbar and window title bar

Keyboard Shortcuts

Shortcut Action
Ctrl+N New tab
Ctrl+O Open file
Ctrl+S Save
Ctrl+W Close tab
Ctrl+Q Quit
Ctrl+Z / Ctrl+Y Undo / Redo
Ctrl+F Find
Ctrl+H Find & Replace
F7 Toggle spell check
Escape Close Find & Replace panel

Requirements

  • Java 21 LTS (JDK 23+ incompatible — javafx-web requires jdk.jsobject module removed in JDK 23)
  • Maven 3.9+

Build & Run

# Fast dev iteration (launches JavaFX directly)
mvn javafx:run

# Build fat JAR
mvn package

# Run tests
mvn test

Note: The fat JAR (java -jar target/splitmd.jar) is built with Launcher.java as its entry point to avoid "JavaFX runtime components are missing" errors. It bundles all dependencies, but the native libraries inside are platform-specific to the build OS. Use mvn javafx:run for development.

Target Machine

#Ensure JDK 21.x is installed on the machine, for example:
C:\jdk-21.0.2\bin

#Note that this should most likely be OpenJDK 21, available here:
https://jdk.java.net/archive/

# Create .bat file pointing to the Jar, for example:
@echo off
"C:\jdk-21.0.2\bin\java.exe" -jar splitmd.jar
pause

# Add this .bat file to the same folder as the Jar and run it to launch

Tech Stack

Concern Library
UI JavaFX 21
Markdown flexmark-java 0.64.8 (GFM)
Editor RichTextFX 0.11.3
Spell check LanguageTool 6.4 (English, embedded)
PDF export OpenHTMLtoPDF 1.0.10
Distribution Maven Shade Plugin (fat JAR)

Architecture

com.splitmd/
  App.java                  # JavaFX entry point; sets application icon
  Launcher.java             # Non-Application launcher for the fat JAR
  controller/
    EditorController.java   # MVC coordinator (per-tab, 300ms render debounce)
  service/
    RenderService.java      # GFM → HTML (flexmark)
    FileManager.java        # open/save/recent files (max 10)
    ExportService.java      # HTML + PDF export
    ThemeManager.java       # dark/light CSS swap, tracks PreviewPanes
    SpellCheckService.java  # LanguageTool, daemon thread, 800ms debounce
    PreferencesService.java # java.util.prefs wrapper (com/splitmd node)
  model/
    Document.java           # path, content, dirty flag per tab
    AppPreferences.java     # window/theme/splitter state
  ui/
    MainWindow.java         # root scene + TabPane management
    EditorPane.java         # CodeArea wrapped in VirtualizedScrollPane; 3-layer merged highlighting
    PreviewPane.java        # WebView wrapper (BorderPane composition)
    MenuBarBuilder.java     # menu construction
    SplitMDToolBar.java     # icon + label toolbar
    StatusBar.java          # word/char count, position, encoding
    FindReplacePanel.java   # non-modal slide-in search/replace
    SyntaxHighlighter.java  # RichTextFX style spans (regex-based)

License

SplitMD is released under the MIT License. See LICENSE for details.

Third-party libraries and bundled assets are listed in THIRD_PARTY_LICENSE. Notable inclusions:

  • Feather Icons — MIT (toolbar icons)
  • JetBrains Mono — SIL Open Font License 1.1 (editor font)
  • LanguageTool & OpenHTMLtoPDF — LGPL v2.1+ (shaded into the fat JAR; source available from their respective projects)

About

Split View MD Reader/Editor

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages