This sample and article shows how to integrate the DS Server DocumentEditor using JavaScript into an ASP.NET Blazor application. Blazor allows you create interactive web applications using C#. DS Server provides the backend engine to integrate document processing into web applications.

Trial Token

For this tutorial, a trial token is required and can be easily created on the dedicated DS Server website:

Get Token

Adding JavaScript

After you created a new Blazor application in Visual Studio, open the _Host.cshtml page in the Pages folder. In the <head> tag, add the following script tag:


In the same page, add the following script tag into the <body> element and add your private clientId and clientSecret:


In the folder Pages, create a new Razor page named Editor.razor and add the following content:


This code calls the addEditorToElement method that has been added to the _Host.cshtml page.

Finally, the new page is added to the navigation:


On starting the application, the document editor is shown when navigating to the new page editor:

TX Text Control in Razor

Sample Application

You can test this on your own by downloading the sample from our GitHub repository.