Centeva.HtmlContentEditor 1.0.3

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Centeva.HtmlContentEditor --version 1.0.3                
NuGet\Install-Package Centeva.HtmlContentEditor -Version 1.0.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Centeva.HtmlContentEditor" Version="1.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Centeva.HtmlContentEditor --version 1.0.3                
#r "nuget: Centeva.HtmlContentEditor, 1.0.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Centeva.HtmlContentEditor as a Cake Addin
#addin nuget:?package=Centeva.HtmlContentEditor&version=1.0.3

// Install Centeva.HtmlContentEditor as a Cake Tool
#tool nuget:?package=Centeva.HtmlContentEditor&version=1.0.3                

Centeva.HtmlContentEditor

HTML Content Editor based on TinyMCE Editor with extensions for tracked changes, comments, and SUNSI. Also, contains feature flag for using MathType that requires external implementation detailed in a separate ReadMe.

Built With

Prerequisites

  • Consuming Project should use Centeva.DomainModeling 10.2.0 or greater

Implementation

In Data project of the application using the HtmlContentEditor.

  1. Add the Nuget Package from Nuget.org. https://www.nuget.org/packages/Centeva.HtmlContentEditor/

  2. serviceConfiguration.cs

    services.AddHtmlContentEditor(configuration);
    
  3. dbContext class

    Add entity configurations using the extension method from HtmlContentEditor. If a different schema from dbo is needed a string can be sent in to ApplyHtmlContentEditor. Defaults to null. (Using different schemas is experimental since Rai doesn't use them)

    modelBuilder.ApplyHtmlContentEditor();
    
  4. If you will be accessing the content entities directly ie setting up Repositories on them versus just using the entities as properties of other entities you may need to add dbsets for the entities.

  5. Because we record userIds for Tracked Changes and Comments before sending to the frontend we must get the users first and last names which is what the BasicUser dto is for. Helper functions have been added to simplify the code needed.

    Example:

    var contentCreatedByUserIds = UserFirstLastNameHelper.GetUserIdsForCommentsAndTrackedChanges(contentSummary);
    var contentCreatedByUsers = await _userRepository.ListAsync(
        new GetUsersByIdsSpecification(contentCreatedByUserIds),
        x => new BasicUser(x.Id, x.Name.First, x.Name.Last), cancellationToken);
    UserFirstLastNameHelper.AddCreatedByNameToCommentsAndTrackChanges(contentCreatedByUsers.ToList(), contentSummary);
    
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.4 96 1/2/2025
1.0.3 109 12/18/2024