https://github.com/romanov/monobrowser
MonoBrowser Core is a markdown (CommonMark) rendering engine written in F# for MonoGame, and adaptable to desktop, mobile, and embedded applications.
https://github.com/romanov/monobrowser
markdown render rendering-engine
Last synced: 4 months ago
JSON representation
MonoBrowser Core is a markdown (CommonMark) rendering engine written in F# for MonoGame, and adaptable to desktop, mobile, and embedded applications.
- Host: GitHub
- URL: https://github.com/romanov/monobrowser
- Owner: romanov
- Created: 2024-10-27T11:44:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-05T12:49:13.000Z (over 1 year ago)
- Last Synced: 2025-08-15T04:38:43.022Z (9 months ago)
- Topics: markdown, render, rendering-engine
- Language: F#
- Homepage:
- Size: 90.8 KB
- Stars: 14
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# MonoBrowser Core
Render local and remote markdown files inside your projects and games!

## Quick start
Install via [Nuget](https://www.nuget.org/packages/MonoBrowser/): `dotnet add package MonoBrowser`
1. 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);
```
2. Open remote markdown document with `browser.Navigate("https://yoursite/readme.md")`
3. Close window with `browser.Close()`
## Documentation
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!
""");
```
## About

* 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](https://monogame.net), and adaptable to desktop, mobile, and embedded C#/F# applications.
## Support
Works in your C# or F# MonoGame projects.
Library tested on Windows 11, and Mac OS Sequoia 15.0
## Roadmap
1. Multiple windows.
2. Basic styles.
3. Smooth scrolling.
## Licenses
[ImageSharp](https://github.com/SixLabors/ImageSharp) - allows convert images to PNG and load it to the game
[AngleSharp](https://github.com/AngleSharp/AngleSharp) - HTML parser
[Markdig](https://github.com/xoofx/markdig) - markdown parser
[FontStashSharp](https://github.com/FontStashSharp/FontStashSharp) - fonts and text rendering
[Apos Input](https://github.com/Apostolique/Apos.Input) - events
[Inter font](https://openfontlicense.org/) - default font