Write formatted text for wxPython in Markdown.
Project description
wxMarkdown
wxMarkdown makes adding panels of formatted text much easier!
In stead of having to open and close each context yourself with a RichTextCtrl
,
enter what you want in Markdown and see it appear with the right styling.
Table of contents
Example
It's straight-forward. You initialise the Markdown panel as you would any other panel. You add Markdown content to it with AddContent
. That's it. Embed it how you'd like.
import wx
import wxmarkdown as wxm
app = wx.App()
frame = wx.Frame(None)
md = wxm.Markdown(frame)
md.AddContent("""
# A Very Simple Example
This example doesn't showcase _all supported syntax_.
It's just meant to showcase **how to use the package**.
""")
frame.Show()
app.MainLoop()
Feature support
All basic Markdown syntax is supported. The package currently uses Markdown
for parsing.
- Italic text
- Bold text
- Inline code
- Heading
- Unordered list
- Ordered list
- Link
- Image
- Blockquote
Horizontal rule
You can enable the embedding of external images by setting allow_download_images
to True
.
To-Do
Some of these features are likely not yet implemented solely because I haven't been able to figure out wxPython
's Rich Text modules fully. If you understand how the package works and know a solution for either of these todos, I would greatly appreciate if you'd get in contact with me.
- Linkable images: This could be implemented by binding a function to the click of an image. However, I cannot get this to work within the context of a
RichTextCtrl
. - Link hover effect: Change appearance of a link upon hovering over it.
- Horizontal Rule: A horizontal divider
- Improve default theme
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file wxMarkdown-1.0.0.post1.tar.gz
.
File metadata
- Download URL: wxMarkdown-1.0.0.post1.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed898d7b1324edc343dda60bb38407ac770202393395ccc98d23dd468c054639 |
|
MD5 | 63c5ec686f90909a209b3ab6d2c87d49 |
|
BLAKE2b-256 | 7ea849ca5cf5fd061e3faedc4bb3ff742992b07420d3271fd244d39b1b5b0ecb |
File details
Details for the file wxMarkdown-1.0.0.post1-py3-none-any.whl
.
File metadata
- Download URL: wxMarkdown-1.0.0.post1-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4428ff88a8c171868476df0f92f66c6704793e3cbcb215c485e6c3966b50c7fe |
|
MD5 | 5f169776c80c1ca9e0b3b2f8d9fb692b |
|
BLAKE2b-256 | e3fc28ffc5fed40d7340ba470167b7a95b780ee230a66adf26622e8dd5e377c9 |