Skip to main content

a package based on PySide6 designed to help you preview Markdown documents.

Project description

QMarkdownView

Description

QMarkdownView is a package based on PySide6 designed to help you preview Markdown documents.

Markdown by default supports code highlighting and LaTex mathematical formulas.

How to use

Firstly, you need to introduce the QMarkdownView library.

from QMarkdownView import MarkdownView, LinkMiddlewarePolicy

You can use the component class `MarkdownView`` we provide.

widget = MarkdownView()

MarkdownView inherits from QWebEngineView.

You can change the Markdown rendering plugin through the setExtension member function. The markup rendering engine for this function library is python-markdown.

widget.setExtensions(["markdown.extensions.tables", "markdown.extensions.extra"])

You can modify Markdown text through the setValue member function.

widget.setValue("# Hello world!")

Warning: You need to call this function after the component is loaded.

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

QMarkdownView-0.2.tar.gz (2.0 MB view hashes)

Uploaded Source

Built Distribution

QMarkdownView-0.2-py3-none-any.whl (2.0 MB view hashes)

Uploaded Python 3

Supported by

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