Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Text Editing & Markdown

Dear ImGui Bundle includes libraries for syntax-highlighted text editing and markdown rendering.

imgui_md - Markdown Rendering

Introduction

imgui_md renders markdown content directly in your ImGui interface. Supports headers, bold, italic, links, code blocks, lists, and more.

Quick example:

Python
C++
from imgui_bundle import imgui_md, immapp

def gui():
    imgui_md.render("""
# Hello Markdown

This is **bold** and this is *italic*.

- List item 1
- List item 2
    """)

immapp.run(gui, with_markdown=True)

You may also use imgui_md.render_unindented(s) – it removes the leading indentation of the markdown string before rendering, which is useful when the string is defined inside a function with indentation.

Images

imgui_md supports images from local assets and from URLs.

Standard markdown images:

![local image](images/world.png)
![online image](https://example.com/photo.jpg)

HTML img tags with explicit size:

<img src="https://example.com/photo.jpg" width="200">
<img src="images/logo.png" width="100" height="50">

Full Demo

Try online | Python | C++

Documented APIs

ImGuiColorTextEdit - Syntax Highlighting Editor & Diff Viewer

Introduction

ImGuiColorTextEdit is a syntax highlighting text editor and diff viewer for ImGui (originally by BalazsJako, rewritten from scratch by Johan A. Goossens).

Dear ImGui Bundle uses a fork with a few additions for Python bindings.

Features:

Full Demo

Try online | Python | C++

Documented APIs