Giter Site home page Giter Site logo

linecode / qmarkdowntextedit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pbek/qmarkdowntextedit

0.0 1.0 0.0 1.47 MB

A C++ Qt QPlainTextEdit widget with markdown highlighting support and a lot of other extras

Home Page: http://www.qownnotes.org

License: MIT License

QMake 0.39% C++ 99.08% CMake 0.33% Shell 0.20%

qmarkdowntextedit's Introduction

QMarkdownTextEdit

Build Status GitHub Actions Build Status Linux/OS X Build Status Windows

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 Tab and Shift + Tab
  • Duplicate text with Ctrl + Alt + Down
  • Searching of text with Ctrl + F
    • Jump between search results with Up and Down
    • Close search field with Escape
  • Replacing of text with Ctrl + R
    • You can also replace text with regular expressions or whole words
  • 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

Screenhot

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

  • Include qmarkdowntextedit.pri to your project like this include (qmarkdowntextedit/qmarkdowntextedit.pri)
  • add a normal QPlainTextEdit to your UI and promote it to QMarkdownTextEdit (base class QPlainTextEdit)

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.

qmarkdowntextedit's People

Contributors

data-man avatar gremious avatar liulex avatar pbek avatar rwiesenfarth avatar sanderboom avatar sandsmark avatar sdicke avatar stuhlmeier avatar szinedine avatar waqar144 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.