Add Blazor DOCX Editor SDK component code
1 Dec 20252 minutes to read
Syncfusion® offers a Code Generator component for Blazor platform, enabling seamless integration of the Syncfusion® DOCX Editor SDK component into your Razor files with minimal effort. It automatically inserts the necessary code, including Syncfusion® DOCX Editor SDK component, required namespaces, styles, and NuGet references, at your chosen location. It simplifies the process by interacting with data models and embedding the Syncfusion® DOCX Editor SDK component with the desired features directly into your application.
The steps below will assist you to add the Syncfusion® DOCX Editor SDK component code in your Blazor application through Visual Studio:
NOTE
Before using the Syncfusion® Blazor DOCX Editor SDK Code Generator, check whether the Syncfusion® DOCX Editor SDK Extension is installed or not in Visual Studio Extension Manager by clicking on the Extensions -> Manage Extensions -> Installed. If this extension not installed, install the extension by follow the steps from the download and installation help topic.
-
Open your existing Blazor application or create a new Blazor application in the Visual Studio 2022 or later.
-
To open the Syncfusion® Blazor DOCX Editor SDK Code Generator, select one of the options below in the Razor file, and then add Syncfusion® DOCX Editor SDK component:
Option 1:
To generate a specific component code, right-click on the editor of the Razor file at the required line and Select the Syncfusion® Blazor DOCX Editor SDK Code Generator…

Option 2:
Open the .razor file and place the cursor at the required line then choose Extension -> Syncfusion® -> Essential Studio® for DOCX Editor SDK -> Syncfusion® Blazor DOCX Editor SDK Code Generator… from the Visual Studio menu.

It generates the selected Syncfusion® DOCX Editor SDK component render code and inserts it wherever the cursor is positioned.

-
In the Output window, select the Syncfusion® Blazor DOCX Editor SDK Code Generator from the “Show output from” drop-down to see the changes made to your application.

-
The selected Syncfusion® Blazor DOCX Editor SDK component code is inserted into the active Razor file, and the application is configured with the latest NuGet package, styles, and namespaces required for the selected component.
-
If you have installed the trial setup or NuGet packages from nuget.org, you must register the Syncfusion® license key to your application as Syncfusion® has introduced the licensing system from 2018 Volume 2 (v16.2.0.41) Essential Studio® release. Navigate to the help topic to generate and register the Syncfusion® license key to your application. Refer to this blog post to know more about the licensing changes introduced in Essential Studio®.