pbek/qmarkdowntextedit
소개
Markdown 구문 강조 기능과 여러 추가 기능을 제공하는 C++ Qt QPlainTextEdit 위젯입니다.
개발 도구What you can do
- Markdown highlighting
- Code syntax highlighting
- Clickable links with Ctrl + Click
- Block indent with Tab and Shift + Tab
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalQMarkdownTextEdit
QMarkdownTextEdit is a C++ Qt QPlainTextEdit widget with markdown highlighting and some other goodies.
Widget Features
- Markdown highlighting
- Code syntax highlighting
- Clickable links with
Ctrl + Click - Block indent with
TabandShift + Tab - Duplicate text with
Ctrl + Alt + Down - Searching of text with
Ctrl + F- Jump between search results with
UpandDown - Close search field with
Escape
- Jump between search results with
- Replacing of text with
Ctrl + R- You can also replace text with regular expressions or whole words
- Line numbers (Qt >= 5.5)
- Very fast
- And much more...
Supported Markdown Features
Commonmark compliance is enforced where possible however we are not fully Commonmark compliant yet. Following is a list of features/extensions supported by the highlighter. Please note that this is just a plaintext editor and as such, it only does the highlighting and not rendering of the markdown to HTML.
| Feature | Availablity |
|---|---|
| Bolds and Italics | Yes |
| Lists (Unordered/Orderered) | Yes |
| Links and Images (Inline/Reference/Autolinks/E-mail) |
Yes (Cannot handle nested links or complex cases yet) |
| Heading (ATX and Setext) | Yes |
| Codeblocks (indented and fenced) Both backtick and tilde code fences are supported |
Yes (Only fenced code block has syntax highlighting) |
| Inline code | Yes |
| Strikethrough | Yes |
| Underline | Yes (Optional) |
| Blockquotes | Yes |
| Table | Yes |
Screenshot

Usage
There are multiple ways to use this. You can use the editor directly, or you can subclass it or you can just use the highlighter.
Using the editor
QMake
- Include qmarkdowntextedit.pri
to your project like this
include (qmarkdowntextedit/qmarkdowntextedit.pri) - add a normal
QPlainTextEditto your UI and promote it toQMarkdownTextEdit(base classQPlainTextEdit)
CMake
- Include CMakeLists.txt
to your project like this
add_subdirectory(qmarkdowntextedit) - add a normal
QPlainTextEditto your UI and promote it toQMarkdownTextEdit(base classQPlainTextEdit)
Using the highlighter only
Highlighter can work with both QPlainTextEdit and QTextEdit. Example:
auto doc = ui->plainTextEdit->document();
auto *highlighter = new MarkdownHighlighter(doc);
Projects using QMarkdownTextEdit
Disclaimer
This SOFTWARE PRODUCT is provided by THE PROVIDER "as is" and "with all faults." THE PROVIDER makes no representations or warranties of any kind concerning the safety, suitability, lack of viruses, inaccuracies, typographical errors, or other harmful components of this SOFTWARE PRODUCT.
There are inherent dangers in the use of any software, and you are solely responsible for determining whether this SOFTWARE PRODUCT is compatible with your equipment and other software installed on your equipment. You are also solely responsible for the protection of your equipment and backup of your data, and THE PROVIDER will not be liable for any damages you may suffer in connection with using, modifying, or distributing this SOFTWARE PRODUCT.
관련 프로젝트 살펴보기
불러오는 중…