Skip to main content

Markdown Renderer for customtkinter

Project description

ctk-markdown

python customtkinter status

ctk-markdown is a CustomTkinter Markdown renderer based on CTkTextbox. It applies rich tags for headings, lists, tables, code blocks, and inline formatting.

✨ Features

  • Single widget (CTkMarkdown) with Markdown rendering
  • Headings, lists, blockquotes, tables, and code blocks
  • Basic syntax highlighting for Python and JavaScript
  • Theme-aware colors for light and dark appearance modes

📦 Installation

pip install ctk-markdown

🚀 Usage

from ctk_markdown import CTkMarkdown
import customtkinter as ctk

app = ctk.CTk()
frame = ctk.CTkFrame(app)
frame.pack(fill="both", expand=True, padx=16, pady=16)

renderer = CTkMarkdown(frame)
renderer.pack(fill="both", expand=True)
renderer.set_markdown("""# Title\nText with *italic* and **bold**.""")

app.mainloop()

🧠 How it works

The widget inherits from CTkTextbox. Markdown parsing is done line by line and uses Tkinter text tags for styling. Theme colors are applied based on the current CustomTkinter appearance mode.

🧪 Run the demo

python example.py

🤝 Contributing

Contributions are welcome!

  1. Fork the repo
  2. Create a feature branch (feature/my-change)
  3. Commit your changes
  4. Open a Pull Request with a clear description

Ideas:

  • More language grammars for code highlighting
  • Image support
  • Clickable links

📄 License

Choose a license (e.g., MIT) before publishing to GitHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ctk_markdown-0.1.0.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ctk_markdown-0.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file ctk_markdown-0.1.0.tar.gz.

File metadata

  • Download URL: ctk_markdown-0.1.0.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ctk_markdown-0.1.0.tar.gz
Algorithm Hash digest
SHA256 03647b8d25c3bc14b798998063cc9137fe40fa1382fa6685e5f0737611c30db3
MD5 333b692a667f97dac6d36eeb5ccebc67
BLAKE2b-256 fdf3476ce6e384da671e944671dba8d6d141ff096583900ffcb7559d6306130f

See more details on using hashes here.

Provenance

The following attestation bundles were made for ctk_markdown-0.1.0.tar.gz:

Publisher: python-publish.yml on lukagouvea/CTkMarkdown

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ctk_markdown-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ctk_markdown-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ctk_markdown-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b40c87271b2620b5b61db7b7cae3b3816244c86f6c1e7804a927728b01fb1408
MD5 1257520ca7995b089510c223d499a5a3
BLAKE2b-256 022298a24c10fb669c5f6fc360f5c8d5c07ecd5807e14715467ed71c2feb578c

See more details on using hashes here.

Provenance

The following attestation bundles were made for ctk_markdown-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on lukagouvea/CTkMarkdown

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page