Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/skclusive/skclusive.script.prism

PrismJs Blazor integration
https://github.com/skclusive/skclusive.script.prism

aspnetcore blazor dotnet-core

Last synced: 21 days ago
JSON representation

PrismJs Blazor integration

Awesome Lists containing this project

README

        

Skclusive.Script.Prism
=============================

Code Highliter component library for Blazor. Integrating PrismJs.

## Installation

Add a reference to the library from [![NuGet](https://img.shields.io/nuget/v/Skclusive.Script.Prism.svg)](https://www.nuget.org/packages/Skclusive.Script.Prism/)

## Usage

Add the following in `_Imports.razor`:

```cs
@using Skclusive.Script.Prism
```

Make the registration in **Startup.cs**

```cs
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddPrism();
}

public void Configure(IComponentsApplicationBuilder app)
{
app.AddComponent("app");
}
}
```

Add the resources in **App.razor**

```html

....

```

you can use the **PrismCode** component to render code block as blow

```html



//...