Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juliagtk/gtkmarkdowntextview.jl
A simple GtkTextView to display markdown text
https://github.com/juliagtk/gtkmarkdowntextview.jl
gtk julia-language markdown
Last synced: 3 months ago
JSON representation
A simple GtkTextView to display markdown text
- Host: GitHub
- URL: https://github.com/juliagtk/gtkmarkdowntextview.jl
- Owner: JuliaGtk
- License: other
- Created: 2018-10-14T12:57:10.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-28T00:40:25.000Z (4 months ago)
- Last Synced: 2024-11-09T08:02:35.494Z (3 months ago)
- Topics: gtk, julia-language, markdown
- Language: Julia
- Homepage:
- Size: 55.7 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# GtkMarkdownTextView
[![CI](https://github.com/JuliaGtk/GtkMarkdownTextView.jl/actions/workflows/CI.yml/badge.svg)](https://github.com/JuliaGtk/GtkMarkdownTextView.jl/actions/workflows/CI.yml)
[![Coverage Status](https://coveralls.io/repos/jonathanBieler/GtkMarkdownTextView.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/jonathanBieler/GtkMarkdownTextView.jl?branch=master)A widget to display simple markdown formatted text:
![screenshot](assets/GtkMarkdownTextView.png)
```julia
using Gtk4, GtkMarkdownTextVieww = GtkWindow("")
md = """
# h1 heading
## h2 heading
## h3 heading
*italic* normal **bold**code
> quote
- item 1
- items 21. list
2. list2"""
v = MarkdownTextView(md)
push!(w,v)
show(w)
```The constructor can take a prelude text and color settings :
```julia
MarkdownTextView(m::String, prelude::String, mc::MarkdownColors = MarkdownColors())
```The color settings are defined as :
```julia
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")```