Markdown Renderer for customtkinter
Project description
ctk-markdown
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!
- Fork the repo
- Create a feature branch (
feature/my-change) - Commit your changes
- Open a Pull Request with a clear description
Ideas:
- More language grammars for code highlighting
- Image support
- Clickable links
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ctk_markdown-0.1.1.tar.gz.
File metadata
- Download URL: ctk_markdown-0.1.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ac2eee225ca264814bfc3bbce0b0dafa3ca598c593ca096abd473f2ee2ad5c6
|
|
| MD5 |
12e0588022ce811e437f019453d670ad
|
|
| BLAKE2b-256 |
0acdde867ecb7f540635c5a9cd049920dafede292048ada983059680e96d46ab
|
Provenance
The following attestation bundles were made for ctk_markdown-0.1.1.tar.gz:
Publisher:
python-publish.yml on lukagouvea/CTkMarkdown
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ctk_markdown-0.1.1.tar.gz -
Subject digest:
6ac2eee225ca264814bfc3bbce0b0dafa3ca598c593ca096abd473f2ee2ad5c6 - Sigstore transparency entry: 930421614
- Sigstore integration time:
-
Permalink:
lukagouvea/CTkMarkdown@075263310d78356d6d9b81b29a1ed19a12f68713 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/lukagouvea
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@075263310d78356d6d9b81b29a1ed19a12f68713 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ctk_markdown-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ctk_markdown-0.1.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
256c332e9d31b11fa89de3a51860aa617112621f1dead6b9916e371b91f4fd62
|
|
| MD5 |
c72f37df6cd0abe808ce9d5783b2679b
|
|
| BLAKE2b-256 |
7be3b6cc0ef489608f00840756c4b7b1faf0ee46d8f74051b085b9a334e05ae5
|
Provenance
The following attestation bundles were made for ctk_markdown-0.1.1-py3-none-any.whl:
Publisher:
python-publish.yml on lukagouvea/CTkMarkdown
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ctk_markdown-0.1.1-py3-none-any.whl -
Subject digest:
256c332e9d31b11fa89de3a51860aa617112621f1dead6b9916e371b91f4fd62 - Sigstore transparency entry: 930421616
- Sigstore integration time:
-
Permalink:
lukagouvea/CTkMarkdown@075263310d78356d6d9b81b29a1ed19a12f68713 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/lukagouvea
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@075263310d78356d6d9b81b29a1ed19a12f68713 -
Trigger Event:
release
-
Statement type: