All Projects → StardustDL → RazorComponents.Markdown

StardustDL / RazorComponents.Markdown

Licence: other
Razor component for Markdown rendering.

Programming Languages

C#
18002 projects
javascript
184084 projects - #8 most used programming language
powershell
5483 projects
HTML
75241 projects

Projects that are alternatives of or similar to RazorComponents.Markdown

Awesome Blazor
Resources for Blazor, a .NET web framework using C#/Razor and HTML that runs in the browser with WebAssembly.
Stars: ✭ 6,063 (+20110%)
Mutual labels:  razor, blazor, razor-components
toast ui.blazor calendar
Toast UI Calendar Wrapper For Blazor
Stars: ✭ 42 (+40%)
Mutual labels:  component-library, razor, blazor
blazor-ui
A collection of examples related to Telerik UI for Blazor Components: https://www.telerik.com/blazor-ui
Stars: ✭ 182 (+506.67%)
Mutual labels:  razor, blazor, razor-components
AzureMapsControl.Components
Razor Components for azure-maps-control
Stars: ✭ 13 (-56.67%)
Mutual labels:  razor, blazor, razor-components
blazor-docs
Public Documentation for Telerik UI for Blazor components.
Stars: ✭ 42 (+40%)
Mutual labels:  razor, blazor, razor-components
Razor.SweetAlert2
A Razor class library for interacting with SweetAlert2
Stars: ✭ 98 (+226.67%)
Mutual labels:  razor, blazor, razor-components
Blazor.PersianDatePicker
A free JavaScript Jalali (Persian) and Gregorian (Miladi) dual datepicker library for Blazor applications
Stars: ✭ 40 (+33.33%)
Mutual labels:  razor, blazor, razor-components
blazor-ui-messages
Localization messages for Telerik UI for Blazor components: https://www.telerik.com/blazor-ui
Stars: ✭ 24 (-20%)
Mutual labels:  blazor, razor-components
BlazorDemo
Demo application for my writings about Blazor
Stars: ✭ 79 (+163.33%)
Mutual labels:  razor, blazor
acblog
An open source extensible static & dynamic blog system. (an alternative tool with same features at StardustDL/paperead)
Stars: ✭ 60 (+100%)
Mutual labels:  blazor, acblog
bulmarazor
BulmaRazor is a component library built on top of Bulma and Blazor.
Stars: ✭ 53 (+76.67%)
Mutual labels:  razor, blazor
fast-blazor
Blazor component library for FluentUI. Microsoft's official lightweight wrapper around the FluentUI Web Components for use with .NET 6.0 Blazor applications
Stars: ✭ 928 (+2993.33%)
Mutual labels:  component-library, blazor
Matblazor
Material Design components for Blazor and Razor Components
Stars: ✭ 2,599 (+8563.33%)
Mutual labels:  blazor, razor-components
blazor-analytics
Blazor extensions for Analytics: Google Analytics, GTAG, ...
Stars: ✭ 101 (+236.67%)
Mutual labels:  blazor, razor-components
bUnit
bUnit is a testing library for Blazor components that make tests look, feel, and runs like regular unit tests. bUnit makes it easy to render and control a component under test’s life-cycle, pass parameter and inject services into it, trigger event handlers, and verify the rendered markup from the component using a built-in semantic HTML comparer.
Stars: ✭ 857 (+2756.67%)
Mutual labels:  blazor, razor-components
SdvCodeWebsite
Simeon Valev - Personal Blog - Developed on ASP.NET Core MVC - Server-Side Blazor - See README.md file for more information
Stars: ✭ 38 (+26.67%)
Mutual labels:  razor, blazor
Blazor-CRUD
Simple CRUD application using C#/Blazor
Stars: ✭ 25 (-16.67%)
Mutual labels:  razor, blazor
AspNetCore6Experiments
ASP.NET Core Blazor BFF with Azure AD and Razor page
Stars: ✭ 43 (+43.33%)
Mutual labels:  razor, blazor
MudBlazor
Blazor Component Library based on Material design with an emphasis on ease of use. Mainly written in C# with Javascript kept to a bare minimum it empowers .NET developers to easily debug it if needed.
Stars: ✭ 4,539 (+15030%)
Mutual labels:  component-library, blazor
Fritz.HatCollection
A static website that displays a collection of Fritz's Hats
Stars: ✭ 21 (-30%)
Mutual labels:  blazor

RazorComponents.Markdown

CI CD License downloads

Razor component for Markdown rendering.

Online demo:

Features

  • Abbreviations
  • Auto identifiers
  • Citations
  • Custom containers
  • Definition lists
  • Emphasis extras
  • Figures
  • Footers
  • Footnotes
  • GridTables
  • Mathematics
  • Media links
    • Youtube
    • Bilibili
    • Netease music
  • Pipe tables
  • Task lists
  • Diagrams, flowcharts
  • Auto links
  • Smarty pants
  • Emoji
  • Code highlighting
  • Delay rendering for less CPU intensive
  • HTML Sanitizing to prevent XSS

Usage

Add the newest package on NuGet.

dotnet add package StardustDL.RazorComponents.Markdown

Install

This project is built on Modulight.

Here are the example codes, which based on the instructions from Usage and Use Razor Component Modules. See demo for details.

WebAssembly

// in Program.cs

public static async Task Main(string[] args) 
{ 
    var builder = WebAssemblyHostBuilder.CreateDefault(args); 
    builder.RootComponents.Add<App>("app");

    builder.Services.AddModules(builder => 
    { 
        builder.UseRazorComponentClientModules().AddMarkdownModule(); 
    }); 

    builder.Services.AddTransient(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); 

    // Attention: RunAsyncWithModules
    await builder.Build().RunAsyncWithModules(); 
} 

Razor Pages

// in App.razor

<Modulight.Modules.Client.RazorComponents.UI.ResourceDeclare />

// in Startup: void ConfigureServices(ISeviceCollection services)

using StardustDL.RazorComponents.Markdown;

services.AddModules(builder => {
    builder.UseRazorComponentClientModules().AddMarkdownModule();
});

// Generic hosting. (provided by package Modulight.Modules.Hosting, need to add this package)
// in Program: Task Main(string[] args)

using Microsoft.Extensions.Hosting;

await CreateHostBuilder(args).Build().RunAsyncWithModules();

Using

<StardustDL.RazorComponents.Markdown.MarkdownRenderer
    Value="@MarkdownText"
    Class="your class"
    Style="your styles"
    RenderInterval="@TimeSpan.FromSeconds(10)"/>

Parameters:

  • Value Raw Markdown (String)
  • Class class attribute
  • Style style attribute
  • RenderInterval Delay rendering interval (TimeSpan), default null for no delay.
  • EnableCodeHighlighting Highlighing code blocks, default true.
  • EnableDiagrams Rendering diagrams, default true.
  • EnableMathematics Rendering LaTex lines, default true.
  • EnableHtmlSanitizing Sanitizing the final HTML to prevent XSS, default true.

Preview

Here are some screenshots from the demo project.

Header

Code with highlighting

Extensions

Mathematics

Diagram

Dependencies

License

Apache-2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].