This project demonstrates a professional integration of Syncfusion Blazor Rich Text Editor with Syncfusion Image Editor for building modern content editing applications. The sample showcases real-time image editing capabilities directly within the Rich Text Editor editor, allowing users to crop, rotate, apply filters, and annotate images without leaving the editor.
- Syncfusion Blazor Rich Text Editor: Enterprise-grade Rich Text Editor editor with comprehensive formatting capabilities
- Syncfusion Image Editor: Powerful image manipulation and editing component with professional tools
- Rich Text Editing: Full-featured Rich Text Editor editor with comprehensive formatting tools
- Integrated Image Editing: Edit images directly within the editor without external tools
- Image Manipulation: Crop, resize, rotate, flip, and apply filters to images
- Real-time Preview: See changes instantly as you edit images
- Multiple Format Support: Work with JPG, PNG, GIF, and WebP images
- Annotation Tools: Add drawings, text, and shapes to images
- Professional Editing: Access crop, zoom, filter, and fine-tuning capabilities
Ensure you have the following installed on your development machine:
- .NET 10.0 SDK or later (Download)
- Visual Studio 2022 (v17.12+) or Visual Studio Code with C# extension
- Git for version control (Download)
- A modern web browser (Chrome, Edge, Firefox, or Safari)
git clone https://github.com/SyncfusionExamples/blazor-richtexteditor-imageeditor.git
cd blazor-richtexteditor-imageeditorcd Image_Editor_Integrationdotnet restoreThis will download all required dependencies including:
- Syncfusion.Blazor.RichTextEditor
- Syncfusion.Blazor.ImageEditor
- Syncfusion.Blazor.Popups
- Syncfusion.Blazor.Themes
dotnet builddotnet runThe application will start and display the URL in the terminal (typically https://localhost:5001).
Open your browser and navigate to the displayed URL to see the application in action.
- Launch the application and navigate to your browser
- You'll see the Rich Text Editor with default content and instructions
- To add a new image and edit it:
- Click the Image button in the toolbar
- Select an image file from your computer
- Click the Edit Image button to open the editor
- To edit an existing image:
- Click on any image in the editor to select it
- Click the Edit Image button in the toolbar (or use the quick toolbar)
- The Image Editor will open in a modal dialog
- Edit the image using available tools
- Click Insert to save changes and return to the editor
- Click Cancel to discard changes
- Insert an image: Click toolbar Image button, select image file
- Select for editing: Click on the image in the editor
- Edit Image: Click the
Edit Imagebutton - Crop: Use crop tool to adjust image framing
- Apply Filter: Select a filter from available options
- Fine-tune: Adjust brightness and contrast as needed
- Save: Click
Insertto save edited image - Result: Image is updated in the editor with your changes
Image_Editor_Integration/
├── Components/
│ ├── Layout/
│ │ ├── MainLayout.razor # Main application layout
│ │ └── NavMenu.razor # Navigation menu
│ ├── Pages/
│ │ ├── ImageEditorIntegration.razor # Main editor page with image editor integration
│ │ └── Error.razor # Error handling page
│ ├── _Imports.razor # Global using statements
│ ├── App.razor # Root application component
│ └── Routes.razor # Routing configuration
├── wwwroot/
│ ├── scripts/
│ │ └── rte-image-editor-interop.js # JavaScript interop for RTE and Image Editor
│ ├── bootstrap/ # Bootstrap CSS files
│ └── app.css # Custom styles
├── Program.cs # Application entry point
├── appsettings.json # Application configuration
└── Image_Editor_Integration.csproj # Project file
├── README.md # This file
After following the Rich Text Editor Getting Started guide, add the SignalR configuration to your Program.cs file to handle large image data transmission during image editing:
Add this line to your Program.cs:
This line should be added after your existing Syncfusion service registration:
builder.Services.AddSyncfusionBlazor();
builder.Services.Configure<HubOptions>(o => o.MaximumReceiveMessageSize = 1024 * 1024);The
MaximumReceiveMessageSizeconfiguration allows large image data to be transmitted through SignalR when editing and saving large images. The default value is 32 KB, which may be insufficient for large images.
For production use, you need a valid Syncfusion license.
Register your license in Program.cs:
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY");Visit Syncfusion Licensing for more information.
The theme stylesheet and script can be accessed from NuGet through Static Web Assets. Include the stylesheet and script references within the <head> section of the App.razor file.
<!-- Available themes: bootstrap5, material3, fabric, tailwind, fluent, etc. -->
<link href="_content/Syncfusion.Blazor.Themes/bootstrap5.css" rel="stylesheet" />
<script src="_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor.min.js" type="text/javascript"></script>- Syncfusion Blazor Rich Text Editor
- Syncfusion Blazor Image Editor
- Syncfusion Blazor Dialog
- Blazor Documentation
- .NET 10 Release Notes
Note: This is a demonstration project. For production use, ensure you have valid licenses for both Syncfusion components and implement appropriate security measures.