• Stars
    star
    125
  • Rank 285,129 (Top 6 %)
  • Language
    C#
  • License
    MIT License
  • Created about 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Native markdown rendering on top of Xamarin.Forms & Markdig.

MarkdownView for Xamarin.Forms

NuGet Donate

A native Xamarin.Forms Markdown renderer.

Gallery

Light theme

Introduction

Compared to a majority of solutions, MarkdownView will render every component as a native Xamarin.Forms view instead of via an HTML backend. The Markdown is directly translated from a syntax tree to a hierarchy of Xamarin.Forms views, : no HTML is being produced at all (hurray)!

This will produce a more reactive user interface, at the cost of rendering functionalities (at the moment though!).

Install

Available on NuGet.

Quickstart

var view = new MarkdownView();
view.Markdown = "# Hello world\n\nThis is my first native markdown rendering";
view.Theme = new DarkMarkdownTheme(); // Default is white, you also modify various values
this.Content = view;

Limitations

Unfortunately, Xamarin.Forms string rendering has some limitations ...

  • Inlined images aren't supported (Xamarin.Forms formatted strings doesn't support inlined views) : They will be displayed after the block they are referenced from.
  • Links are only clickable at a leaf block level (Xamarin.Forms formatted strings doesn't support span user interactions) : if a leaf block contains more than one link, the user is prompted. This is almost a feature since text may be too small to be enough precise! ;)
  • SVG rendering is very limited (The SVG rendering is based on SkiaSharp which doesn't seem to manage well all svg renderings)

Roadmap

  • Customization
    • Styles
    • Themes
  • Leaf blocks
    • Headings
    • Paragraphs
    • HTML Blocks (maybe partial and specific support)
    • Link reference definitions
    • Code blocks
    • Thematic breaks
  • Container blocks
    • Block quote
    • Lists
      • Numbers bullet formats
      • Custom bullets
  • Inlines
    • Textual content
    • Emphasis and string emphasis
    • Code spans
    • Links (partial, no interaction)
    • Image blocks (partial, not inlined)
      • SVG Rendering (Skia)
  • Extensions
    • Table blocks
    • Emojis (ascii)
    • Task lists

Thanks

Contributions

Contributions are welcome! If you find a bug please report it and if you want a feature please report it.

If you want to contribute code please file an issue and create a branch off of the current dev branch and file a pull request.

License

MIT Β© AloΓ―s Deniel

More Repositories

1

Humper

Collision detection for Axis-Aligned-Bounding-Boxes (aka AABB) in C#.
C#
101
star
2

Xamarin.Animations

Animate your views with simple shareable animation declarations.
C#
101
star
3

Microcharts.Samples

A set of sample applications that use Microcharts.
C#
91
star
4

Comora

A simple 2D camera for Monogame.
C#
83
star
5

SkiaSharp.Components

Rendered components for an easier declaration of SkiaSharp rendering.
C#
70
star
6

Wires

Light binding library for Xamarin
C#
32
star
7

Spritesheet

Simple helper for creating sprite based animations for Monogame.
C#
32
star
8

Transform

Base Monogame objects for managing relative transforms.
C#
23
star
9

Mvvmicro

Minimalist MVVM framework for .NET.
C#
22
star
10

Standard.SpecialFolders

Just listing all .NETStandard special folder paths.
C#
16
star
11

Xam.Forms.QRCode

A QRCode renderer based on SkiaSharp.
C#
16
star
12

Assetxport

Resize UWP, Xamarin.Android and Xamarin.iOS assets automatically.
C#
15
star
13

PagerViewController

Tabs at the top of the screen for Xamarin.iOS.
C#
14
star
14

Faker.Portable

C# faked data generation for testing and prototyping purpose.
C#
13
star
15

AutoFindViews

Have you ever counted the number of times your wrote 'FindViewById' in your Xamarin.Android project?
C#
13
star
16

Yoga.Parser

Declare your Yoga layouts in XML or JSON from .NET.
C#
11
star
17

Xam.Forms.NavigationExtensions

Helpers for Xamarin.Forms application navigation system : passing arguments, restoration.
C#
10
star
18

GridView

A Xamarin helper layout view that uses C# operator override.
C#
10
star
19

CodeBuilder

A set of helper classes for generating code.
C#
9
star
20

Profiler

A small in-app profiler for Xamarin and UWP applications.
C#
8
star
21

Xamarin.Plugins

Cross platform xamarin and windows plugins for PCLs.
C#
8
star
22

Transmute

Basic data conversion for .NET.
C#
7
star
23

Orkester

Lightweight framework for common centralized synchronization scenarios.
C#
5
star
24

Meetup.Xamarin.France.Demo

A sample base for the various conferences presented at Xamarin Meetups in France.
C#
4
star
25

StaticBind

Generated and compiled data binding for .NET (Xamarin.iOS, Xamarin.Android,...)
C#
3
star
26

Micon

Small application for generating mobile application default icons.
C#
2
star
27

hml

Hierarchy Markup Language, or less verbose xml.
C#
2
star
28

Mwm

MVVM & XAML for the web
C#
2
star
29

Mobile.Prerelease

Prepare your mobile release (BundleId, Name, Version, ...) from a simple CLI.
C#
2
star
30

CommonExtensions

All the common C# objects extensions methods I often use.
C#
1
star
31

Xam.NibLocalizers

Localize your storyboards and xibs automatically from Resx or LocalizedStrings.
C#
1
star
32

Tween

A little tweening library for .NET.
C#
1
star