Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lzinga/blazortextdiff
A blazor component to display side by side text diff.
https://github.com/lzinga/blazortextdiff
blazor blazor-component component diff text-diff
Last synced: 5 days ago
JSON representation
A blazor component to display side by side text diff.
- Host: GitHub
- URL: https://github.com/lzinga/blazortextdiff
- Owner: lzinga
- License: mit
- Created: 2020-01-31T19:29:36.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-10-28T17:19:03.000Z (about 2 years ago)
- Last Synced: 2025-01-04T01:46:54.833Z (5 days ago)
- Topics: blazor, blazor-component, component, diff, text-diff
- Language: HTML
- Homepage: https://www.nuget.org/packages/BlazorTextDiff
- Size: 230 KB
- Stars: 30
- Watchers: 5
- Forks: 7
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Blazor Text Diff
A component to display side by side text diff using the [DiffPlex](https://github.com/mmanela/diffplex) library. There is probably some issues that I have looked over so if you notice one please submit an issue or do a pull request![![publish to nuget](https://github.com/lzinga/BlazorTextDiff/workflows/publish%20to%20nuget/badge.svg)![Nuget](https://img.shields.io/nuget/v/BlazorTextDiff)](https://www.nuget.org/packages/BlazorTextDiff)
![Static Diff](https://i.imgur.com/t0nJPeZ.png)
![Async Diff](https://i.imgur.com/lzjfjhF.png)# Installation
You will need to add the nuget package DiffPlex into your project for this to work. An example project can be found in the [Samples Folder](https://github.com/lzinga/BlazorTextDiff/tree/master/samples/BlazorTextDiff.Web) for implementation.```csharp
// Program.cs
public static async Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
// These must be injected into your application to supply the component with its diff checking.
builder.Services.AddScoped();
builder.Services.AddScoped();builder.RootComponents.Add("app");
await builder.Build().RunAsync();
}
``````html
```
# Usage
```htmlOldText="Old Text"
NewText="New Text"
CollapseContent="true"
ShowWhiteSpace="true">
```