AmgadRichTextArabic 1.0.2
dotnet add package AmgadRichTextArabic --version 1.0.2
NuGet\Install-Package AmgadRichTextArabic -Version 1.0.2
<PackageReference Include="AmgadRichTextArabic" Version="1.0.2" />
<PackageVersion Include="AmgadRichTextArabic" Version="1.0.2" />
<PackageReference Include="AmgadRichTextArabic" />
paket add AmgadRichTextArabic --version 1.0.2
#r "nuget: AmgadRichTextArabic, 1.0.2"
#:package AmgadRichTextArabic@1.0.2
#addin nuget:?package=AmgadRichTextArabic&version=1.0.2
#tool nuget:?package=AmgadRichTextArabic&version=1.0.2
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
IsArabicBoolean parameter (no localizer required). - RTL / LTR editing direction and translated toolbar tooltips.
- Two-way HTML binding via
ValueandValueChanged(@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 throughPrintAsync(). - 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
AmgadRichTextArabicto 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 | الصور
- Click إضافة صورة / Insert image to choose a supported image file.
- Click an image in the editor to select it.
- 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 | Versions 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. |
-
net9.0
- Microsoft.AspNetCore.Components.Web (>= 9.0.19)
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 |