Skip to content

BornTactical/MarkdownFormatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

MarkdownFormatter

Simple markdown formatter for Rich control on U++

Dependencies

Usage:

#include <CtrlLib/CtrlLib.h>
#include <MarkdownFormatter/MarkdownFormatter.h>

using namespace Upp;

GUI_APP_MAIN {
    TopWindow wnd;
    
    RichTextView richTextView;
    richTextView.SetZoom(Zoom(1, 1));
    
    MarkdownFormatter mdf;
    
    RichPara::CharFormat fmt;
    fmt.paper = White();
    fmt.ink   = Black();
    (Font&)fmt = Arial(15);
    
    auto txt = mdf.Format(
        "Normal\n"
        "*Italics*\n"
        "**Bold**\n"
        "~~Strikethrough~~\n"
        "***BoldItalics***\n"
        "http://link\n"
        "```This is a sample code block\nLine #2```\n"
        "Done", fmt);
    
    richTextView.Pick(pick(txt));
    
    wnd.Add(richTextView.SizePos());
    wnd.Title("Markdown test").Sizeable().Run();
}

About

Simple markdown formatter for Rich control on U++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages