Render local and remote markdown files inside your projects and games!
Install via Nuget: dotnet add package MonoBrowser
- Add component to your game or project
var browserWindow = new Rectangle(10, 10, _graphics.PreferredBackBufferWidth - 20, _graphics.PreferredBackBufferHeight - 20);
var browser = new BrowserComponent(this, browserWindow)
{
EnableDebug = true,
EnableScrollbar = true,
AllowScroll = true,
DisableImages = false
};
browser.OnLinkClicked += (_, url) =>
{
// load new page or invoke method inside your game
Console.WriteLine($"User clicked on: {url}");
};
Components.Add(browser);
- Open remote markdown document with
browser.Navigate("https://yoursite/readme.md")
- Close window with
browser.Close()
You can load markdown content directly.
browser.FromString("""
# Game manual
My game is **awesome** and here you can
[read more](https://mygame.test) about it.
## How to play
- Run my game
- Click on a play button
- Enjoy!
""");
- MonoBrowser - a browser for markdown files (in development) based on MonoBrowser Core.
- MonoBrowser Core - a lightweight bare minimum browser component & markdown rendering engine written in F# for MonoGame, and adaptable to desktop, mobile, and embedded C#/F# applications.
Works in your C# or F# MonoGame projects. Library tested on Windows 11, and Mac OS Sequoia 15.0
- Multiple windows.
- Basic styles.
- Smooth scrolling.
ImageSharp - allows convert images to PNG and load it to the game
AngleSharp - HTML parser
Markdig - markdown parser
FontStashSharp - fonts and text rendering
Apos Input - events
Inter font - default font