A Markdown editor and viewer for GNUstep on Linux, implemented in Objective-C using only GPL/LGPL-compatible C and Objective-C libraries.
- Phase 1 — Core:
NSDocument-based file handling,NSTextVieweditor, basic preferences (NSUserDefaults). - Phase 2 — Markdown: Integration with libmarkdown (Discount) to convert Markdown to HTML.
- Phase 3 — Preview: Split view with editor and preview pane; HTML preview (full rendering via WebKitGTK when built).
- Phase 4 — Syntax highlighting: Custom
NSTextStoragewithNSRegularExpressionfor headings, bold/italic, code blocks, links, lists. - Phase 5 — Spell checking: GNU Aspell integration for the editor.
- Phase 6 — Preferences: Font selection, theme (light/dark), preview refresh behavior.
| Purpose | Library | License | Notes |
|---|---|---|---|
| Markdown parsing | Discount (libmarkdown) | BSD | GPL-compatible use |
| HTML preview | WebKitGTK | LGPL | Optional; full HTML |
| Spell checking | Aspell | LGPL | Optional |
| ODT export | libzip | BSD | GPL-compatible |
| Syntax highlighting | Custom Obj-C | Your choice | In-tree |
- GNUstep Make (gnustep-make)
- GNUstep Base and GUI (gnustep-base, gnustep-gui)
- Optional: libmarkdown (Discount) for Markdown→HTML
- Optional: Aspell for spell checking
- Optional: WebKitGTK for HTML preview (see below)
- libzip for ODT export (e.g.
libzip-devon Debian/Ubuntu; build usespkg-config --libs libzip)
. /usr/share/GNUstep/Makefiles/GNUstep.sh # or your installation path
makeInstall the library (package name may be libmarkdown2-dev or build from Discount). Then in GNUmakefile uncomment:
SmallMarkdown_OBJCFLAGS += -DHAVE_MKDIO_H
SmallMarkdown_LDFLAGS += -lmarkdown(Use -ldiscount if your system provides libdiscount.)
Install Aspell and development files, then in GNUmakefile uncomment:
SmallMarkdown_OBJCFLAGS += -DHAVE_ASPELL
SmallMarkdown_LDFLAGS += -laspellThe preview pane currently shows HTML as text. For full HTML rendering:
- Install WebKitGTK development packages (e.g.
libwebkit2gtk-4.1-dev). - Implement an
NSViewthat embeds a WebKitWebView (e.g. via X11 window embedding or a separate GTK widget). - Uncomment the WebKitGTK lines in
GNUmakefileand link your view.
Embedding WebKitGTK in a GNUstep window typically requires passing the X11 window ID from the NSWindow to a GTK socket/plug or similar; the app is structured so this can be added without changing the rest of the code.
./SmallMarkdown.app/SmallMarkdownOr open from the GNUstep menu. You can create new documents or open .md / .markdown files.
Implementation status vs plan: see PLAN_REVIEW.md.
Build and run from the project root (after sourcing GNUstep.sh):
make -C Tests
./Tests/obj/SmallMarkdownUnitTestsOr run both unit and UI tests:
make testUnit tests cover: MarkdownRenderer (render/wrap, empty/nil input), MarkdownTextStorage (replace, attributes), SMDocument (content, dataOfType, readFromData), SMSpellChecker (enable/suggest/check).
Verify document window structure (split view, editor, preview):
make -C Tests
./Tests/obj/SmallMarkdownUITestsOn a headless machine use a virtual display, e.g. xvfb-run ./Tests/obj/SmallMarkdownUITests.
Main.m,SMAppDelegate— application entry and preferences registration.SMDocument,SMWindowController— document and window; editor and split view built in code.MarkdownRenderer— Markdown→HTML via libmarkdown (Discount).SMPreviewView— preview pane (HTML text or WebKitGTK when available).MarkdownTextStorage— syntax highlighting in the editor.SMSpellChecker— Aspell integration.SMPreferencesController— font, theme, preview refresh, spell check options.
This project is under the GNU Affero General Public License v3 or later. See LICENSE.
Libraries used (Discount, Aspell, WebKitGTK) have their own licenses (BSD, LGPL, etc.) and are GPL/LGPL-compatible.