gaelj / BlazorCodeMirror6

Blazor wrapper for CodeMirror 6
MIT License
20 stars 2 forks source link

Blazor CodeMirror 6

NuGet Version

🚧 This project is still a work-in-progress 🚧

codemirror.svg

Blazor CodeMirror 6 brings the power of the CodeMirror 6 code editor to Blazor, offering a comprehensive .NET 6 / .NET 7 / .NET 8 component. It's tailored for both general and specialized use-cases, supporting a range of languages and Markdown editing, extensive support for syntax highlighting, auto-completion, custom linting, themes, Markdown preview, and more.

Try It Out

Visit the live demo to see the component's capabilities.

Features

General

Markdown specific

Screenshots

image

Quick Start

Examples

See Examples.Common/Example.razor

JS / CSS resources are loaded automatically (nothing to add in _Host.cshtml / index.html).

Contributing

We welcome contributions!

Local installation

Architecture

The Node project is automatically built with the .Net project.

FAQs / Troubleshooting

Changelog

See the Changelog

License

Blazor CodeMirror 6 is released under the MIT License. See the LICENSE for more details.

Contact

File an issue or open a discussion

Error reporting

Disclaimer: when a runtime error occurs in one of the demo / example projects, its details are sent to my private account on Sentry.io.

This is to help me detect and fix errors occurring on mobile platforms without the need for USB debugging, and to be informed of any errors that other users of the demo / example projects might encounter.

The component itself does not contain any tracking.

If you run the example projects locally and a runtime error occurs, some personal information will be sent to Sentry (OS, browser details, full path of the source file where the error occurred...)

If this makes you feel uncomfortable but you still wish to run the examples locally, you can disable Sentry by deleting:

builder.WebHost.UseSentry(o => {
    o.Dsn = "https://d0ab79eee7b999c61d2c01fdf3958eeb@o4505402784546816.ingest.sentry.io/4506525909909504";
    // When configuring for the first time, to see what the SDK is doing:
    o.Debug = true;
    // Set TracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
    // We recommend adjusting this value in production.
    o.TracesSampleRate = 1.0;
});
<script
    src="https://js.sentry-cdn.com/d0ab79eee7b999c61d2c01fdf3958eeb.min.js"
    crossorigin="anonymous"
></script>