LazInk
LazInk is an open-source collection of HTML and Markdown text controls for the Lazarus IDE and Free Pascal. The library provides formatted labels, editable text fields, list boxes, scrollable document viewers, and a WYSIWYG Markdown editor.
Unlike conventional rich-text controls, LazInk renders its content directly onto the LCL TCanvas. It does not require a web browser engine, RichMemo, external rendering libraries, or widgetset-specific text backends.
- Project: LazInk on GitHub
- Developer: Tony Stone
- License: BSD Zero Clause (0BSD)
- Current version: 1.0.0.0
- Language: Object Pascal
- Dependencies: Lazarus Component Library (LCL)

Overview
LazInk was developed to provide consistent, formatted text rendering across Lazarus applications without relying on platform-specific rich-text widgets.
All seven controls use canvas-based drawing. The library includes its own document parsing, layout, text rendering, Markdown processing, and image decoding capabilities.
LazInk supports both small pieces of inline HTML and complete documents containing headings, tables, lists, syntax-highlighted code, images, and CSS styling.
A particular feature is TInkRichEdit, which allows users to edit formatted Markdown visually instead of editing its source syntax.
Features
- Canvas-based text rendering without an embedded browser.
- HTML and GitHub Flavored Markdown support.
- WYSIWYG Markdown editing.
- CSS-styled HTML document rendering.
- Syntax-highlighted code blocks.
- PNG, animated GIF, and WebP image support.
- Text selection, clipboard operations, and keyboard navigation.
- Zoom and touch scrolling.
- Light and dark color-scheme support.
- Interactive links and document navigation.
- Cross-platform architecture using the Lazarus LCL.
- No third-party runtime dependencies.
Components
Installing LazInk adds seven controls to the LazInk component palette.
| Component | Description |
|---|---|
TInkLabel |
Displays a caption with inline HTML formatting, links, wrapping, and optional text selection. |
TInkEdit |
Single-line editor supporting per-character styling, selection, and undo/redo. |
TInkMemo |
Scrollable formatted text viewer for logs, messages, transcripts, and streaming content. |
TInkListBox |
List box displaying formatted text with selectable and editable entries. |
TInkRichEdit |
WYSIWYG rich-text editor supporting Markdown input and output. |
TInkCodeMemo |
Plain multiline editor with optional character styling and automatic height adjustment. |
TInkPage |
Complete HTML and Markdown document viewer with CSS, images, links, and navigation. |
TInkLabel

TInkLabel is an alternative to TLabel for applications requiring formatted captions.
It supports inline HTML markup, including font styling, foreground and background colors, links, and text decoration.
InkLabel1.Caption :=
'Status: <b><font color="#00AA00">Connected</font></b>';Additional features include word wrapping, automatic sizing, alignment, ellipsis handling, and optional text selection.
TInkMemo
TInkMemo displays formatted text in a scrollable control.
It is useful for application logs, chat interfaces, debugging output, and other situations where formatted entries are added dynamically.
InkMemo1.TextFormat := itfMarkdown;
InkMemo1.Append('**12:04** Build finished, `0 errors`');The AppendBlock method can insert complete formatted messages, including lists, tables, and highlighted code.
ReplaceLast allows applications to update the most recent message as additional content arrives, making the control useful for streaming AI responses.
TInkRichEdit

TInkRichEdit is a WYSIWYG rich-text editor capable of reading and writing Markdown.
It supports:
- Bold, italic, underline, and other character formatting.
- Font colors, sizes, and backgrounds.
- Headings and paragraph alignment.
- Nested ordered and unordered lists.
- Block quotations.
- Tables.
- Fenced code blocks.
- Hyperlinks.
- Undo and redo.
- Search within the document.
Unlike a conventional Markdown source editor, TInkRichEdit allows users to work directly with the rendered document.
InkRichEdit1.LoadMarkdown(
'## My Document' + LineEnding +
'This is **bold** and *italic* text.'
);The edited document can be retrieved as Markdown:
Memo1.Lines.Text := InkRichEdit1.AsMarkdown;TInkPage

TInkPage is a lightweight document viewer for displaying HTML and Markdown inside Lazarus applications.
InkPage1.LoadFromFile('help/index.html');The control includes a document tree, CSS processing, layout engine, image decoding, hyperlinks, history navigation, search, text selection, and zoom.
Supported content includes headings, tables, nested lists, code blocks, images, and styled document elements.
CSS capabilities include selectors, the cascade, box layout, borders, backgrounds, tables, flex and grid layouts, and media queries.
Unlike a web browser, TInkPage does not execute JavaScript.
Applications can modify the document through its DOM-style API and refresh the displayed content.
This makes it suitable for embedded help systems, documentation viewers, release notes, and application dashboards.
Other controls
TInkEdit provides a single-line text editor with per-character colors and styles supplied by an event. This can be used for syntax coloring and other character-level visual feedback.
TInkCodeMemo is a plain multiline editor with character styling, word wrapping, undo, and automatic height adjustment.
TInkListBox provides formatted list entries, text selection, optional alternating backgrounds, and in-place editing.
Installation
- Download or clone the LazInk repository.
- Open Lazarus.
- Select Package → Open Package File (.lpk).
- Open
lazink.lpkfrom the downloaded directory. - Compile the package.
- Select Use → Install.
- Rebuild or restart Lazarus as prompted.
The components will appear on the LazInk tab of the component palette.
Demonstration application
The repository includes a demonstration application at:
demo/lazinkdemo.lpi
Open this project in Lazarus to explore the controls and their features.
The demonstration is built using the Lazarus form designer and includes a separate tab for each component.
Supported platforms
LazInk is designed around the Lazarus LCL and avoids widgetset-specific rendering implementations.
The current project documentation reports testing on:
| Platform | Environment |
|---|---|
| Linux x86-64 | GTK3, Lazarus trunk, FPC 3.3.1 |
| macOS Intel | Cocoa, Lazarus 4.8, FPC 3.2.4 |
The macOS tests were performed using macOS Sequoia 15 in an Intel virtual machine.
Other Lazarus widgetsets are intended to be supported through the shared LCL drawing architecture, but compatibility should not be assumed without testing.
The project is currently usable, although APIs may change as development continues.
Documentation
Additional technical documentation is available in the project repository:
- README — project overview, features, and installation.
- Complete guide — detailed documentation of controls, events, properties, markup, and examples.
- HTML and CSS support — supported document elements and styling capabilities.
- Source code — complete Object Pascal implementation.
- Issue tracker — bug reports and feature requests.
License
LazInk is released under the BSD Zero Clause License (0BSD), a permissive open-source software license.
Some bundled reference data and decoder tables have separate attribution requirements documented in the repository's LICENSES/THIRD-PARTY.md.
Applications incorporating the WebP decoder through TInkPage should retain the applicable RFC 6386 notice as described by the project.
See also
Talk about this page
Nobody has opened a bench for this page yet. Sign in to open one.


