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: 3 months 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 (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-10-28T17:19:03.000Z (over 2 years ago)
- Last Synced: 2025-03-24T06:04:44.015Z (3 months ago)
- Topics: blazor, blazor-component, component, diff, text-diff
- Language: HTML
- Homepage: https://www.nuget.org/packages/BlazorTextDiff
- Size: 230 KB
- Stars: 30
- Watchers: 4
- 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](https://www.nuget.org/packages/BlazorTextDiff)

# 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">
```