AmgadRichTextArabic 1.0.2

dotnet add package AmgadRichTextArabic --version 1.0.2
                    
NuGet\Install-Package AmgadRichTextArabic -Version 1.0.2
                    
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="AmgadRichTextArabic" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AmgadRichTextArabic" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="AmgadRichTextArabic" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AmgadRichTextArabic --version 1.0.2
                    
#r "nuget: AmgadRichTextArabic, 1.0.2"
                    
#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.
#:package AmgadRichTextArabic@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AmgadRichTextArabic&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=AmgadRichTextArabic&version=1.0.2
                    
Install as a Cake Tool

AmgadRichTextArabic

A reusable Blazor rich-text editor built on Quill 2.0.3, with Arabic (RTL) and English (LTR) support.

مكوّن محرر نصوص منسقة لـ Blazor يدعم العربية والإنجليزية، وإضافة الصور وحذفها، والروابط، وعرض وطباعة المحتوى بصيغة HTML.

Features | المميزات

  • Arabic / English user interface controlled by the IsArabic Boolean parameter (no localizer required).
  • RTL / LTR editing direction and translated toolbar tooltips.
  • Two-way HTML binding via Value and ValueChanged (@bind-Value).
  • Text formatting through the Quill toolbar.
  • Insert PNG, JPEG, GIF, or WebP images from a device; click an image to select it and remove it with the Remove selected image button.
  • Optional hyperlinks (EnableLinks).
  • Read-only display (ReadOnly).
  • HTML access through GetHtmlAsync() and printing through PrintAsync().
  • Multiple editor instances on the same page.
  • JavaScript module and component-scoped CSS.

Requirements | المتطلبات

  • A Blazor application with JavaScript interop enabled.
  • Internet access to load Quill 2.0.3 from jsDelivr CDN. The current component automatically loads Quill JS and CSS at runtime.
  • Include the component in a Razor Class Library named AmgadRichTextArabic to keep the existing JS module import path working.

Files | الملفات

AmgadRichText.razor
AmgadRichText.razor.cs
AmgadRichText.razor.js
AmgadRichText.razor.css
README.md
LICENSE

Usage | طريقة الاستخدام

Import the namespace in _Imports.razor:

@using AmgadRichTextArabic

Use the component with two-way binding:

<AmgadRichText @bind-Value="HtmlContent"
               IsArabic="true"
               EnableImages="true"
               EnableLinks="true"
               EnablePrint="true"
               MinHeight="250" />

@code {
    private string? HtmlContent;
}

Use English with IsArabic="false". You can also bind IsArabic to a Boolean variable to change the language while the component is running.

<AmgadRichText @bind-Value="HtmlContent" IsArabic="@IsArabic" />

@code {
    private bool IsArabic = true;
    private string? HtmlContent;
}

Calling methods | استدعاء الميثود

<AmgadRichText @ref="editor" @bind-Value="HtmlContent" />
<button @onclick="Print">Print</button>

@code {
    private AmgadRichText? editor;
    private string? HtmlContent;

    private async Task Print()
    {
        if (editor is not null)
            await editor.PrintAsync();
    }
}

The component also exposes GetHtmlAsync(), AddImageAsync(), and RemoveSelectedImageAsync().

Parameters | الخصائص

Parameter Type Default Description / الوصف
Value string? null HTML content / محتوى HTML
ValueChanged EventCallback<string?> — HTML change callback / حدث تغيير المحتوى
ReadOnly bool false View-only mode / للعرض فقط
IsArabic bool true true: Arabic RTL; false: English LTR
ShowPrintButton bool true Show the built-in print button / إظهار زر الطباعة
PrintTitle string "مستند" Print document title / عنوان مستند الطباعة
Placeholder string? null Placeholder; automatically localized when null
EnableImages bool true Image insertion and deletion controls / أدوات الصور
EnablePrint bool true Enable printing / السماح بالطباعة
EnableLinks bool true Link editing / تحرير الروابط
MinHeight int 220 Minimum editor height in pixels / أقل ارتفاع بالبكسل

Images | الصور

  1. Click إضافة صورة / Insert image to choose a supported image file.
  2. Click an image in the editor to select it.
  3. Click حذف الصورة المحددة / Remove selected image to delete it.

Images are inserted into the HTML as Base64 data URLs. This can substantially increase the size of saved HTML. Consider server-side file storage for large images in future versions.

Printing | الطباعة

Enable the built-in print button, or call PrintAsync() through @ref. Printing uses a separate document with A4-oriented print CSS. The browser's print dialog and available fonts determine the final output.

Notes | ملاحظات

  • The Quill runtime is loaded from https://cdn.jsdelivr.net/npm/quill@2.0.3/; it is a separate third-party dependency with its own licensing terms.
  • Treat saved HTML as untrusted if it may come from other users; sanitize it before rendering or distributing it outside trusted workflows.
  • The component's JavaScript import is currently ./_content/AmgadRichTextArabic/AmgadRichText.razor.js. Ensure the library's assembly/static web assets path matches this name.

License

Project code is made available under the MIT License. Third-party dependencies retain their own licenses.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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.2 99 11/13/2026