Skip to content

EasyHtmlToolkit is a versatile library designed to simplify the creation and manipulation of HTML content in C#. It provides a straightforward and intuitive API for generating HTML documents dynamically, making it easier to integrate HTML generation into your applications.

License

Notifications You must be signed in to change notification settings

Maniceraf/EasyHtmlToolkit

Repository files navigation

EasyHtmlToolkit

EasyHtmlToolkit is a lightweight and versatile C# library designed to simplify the generation and manipulation of HTML content programmatically. Whether you're creating dynamic web pages, generating HTML emails, or automating report generation, EasyHtmlToolkit provides an intuitive API to streamline the process.

Project Overview:

EasyHtmlToolkit facilitates the creation and customization of HTML documents directly from C# code. It provides a set of classes and methods to generate HTML elements, manage attributes, handle events, and save generated HTML to files. This toolkit aims to simplify tasks that involve dynamic HTML generation, offering flexibility and ease of integration into C# applications.

Getting Started:

Installation:

You can install EasyHtmlToolkit via NuGet Package Manager:

Install-Package Maniceraf.EasyHtmlToolkit -Version 1.0.0

Usage:

Here's a quick example of how to use EasyHtmlToolkit to generate a simple HTML document:

using EasyHtmlToolkit;

class Program
{
    static void Main(string[] args)
    {
        // Create a new HTML document
        var document = new HtmlDocument();
        
        // Create a div element with some text content
        var div = new HtmlElement("div");
        div.InnerText = "Hello, EasyHtmlToolkit!";
        
        // Add the div element to the document body
        document.Body.AddChild(div);
        
        // Save the HTML document to a file
        document.SaveToFile("output.html");
        
        Console.WriteLine("HTML document generated successfully.");
    }
}

Use Case:

I have encountered a number of tasks because the customer wanted that and assigned me the task to do in their system generate a report sent to them every day to their email the content in which needless to say is always There must be an attached excel file containing revenue report data information and some other tasks so they can track their business. But in this report, they want an html file that also has the same content as the excel file, but they still want it for convenience. As you know, the customer is king. But I realized that in the system, more and more reports like that were gradually being created with the need for an html file. and each report generates a different format, but in general the code is a lot and very complicated and difficult to fix bugs, so I decided to write this library to solve this common problem. If you need it, please refer to it.

Contributing:

Contributions are welcome! If you have suggestions, improvements, or bug fixes, please submit a pull request or open an issue on GitHub.

License:

This project is licensed under the MIT License - see the LICENSE file for details.

About

EasyHtmlToolkit is a versatile library designed to simplify the creation and manipulation of HTML content in C#. It provides a straightforward and intuitive API for generating HTML documents dynamically, making it easier to integrate HTML generation into your applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages