Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/skclusive/skclusive.script.prism
- Owner: skclusive
- License: mit
- Created: 2020-01-19T12:22:09.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T16:11:13.000Z (about 2 years ago)
- Last Synced: 2024-10-06T07:42:32.538Z (3 months ago)
- Topics: aspnetcore, blazor, dotnet-core
- Language: JavaScript
- Homepage:
- Size: 278 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
//...