Skip to content

JuliaGtk/GtkMarkdownTextView.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GtkMarkdownTextView

CI Coverage Status

A widget to display simple markdown formatted text:

screenshot

using Gtk4, GtkMarkdownTextView

w = GtkWindow("")

md = """
# h1 heading
## h2 heading
## h3 heading
*italic* normal **bold**

    code

> quote

- item 1
- items 2

1. list
2. list2

"""

v = MarkdownTextView(md)
push!(w,v)
show(w)

The constructor can take a prelude text and color settings :

MarkdownTextView(m::String, prelude::String, mc::MarkdownColors = MarkdownColors())

The color settings are defined as :

struct MarkdownColors
    font_size::Int
    color::String
    background::String
    highlight_color::String
    highlight_background::String
end

# default values
MarkdownColors() = MarkdownColors(13, "#000", "#fff", "#111", "#eee")