How To Highlight Text And Link It To Specific Content In A DOCX Editor Using Python
This sample demonstrates how to highlight selected text and link it to specific content within a DOCX document using the Syncfusion® React DOCX Editor and a Python backend service. The application allows users to create highlighted hyperlinks that navigate directly to bookmarked content, making document navigation faster and more intuitive.
Running the Sample
Server-Side Setup (Python Web Service)
1. Navigate to the .NET Wrapper Project
cd .NET Standard Wrapper Library
2. Build the Wrapper Library
dotnet build -c Release
3. Publish the Wrapper Library
dotnet publish -c Release
4. Navigate to the Python Service
cd ../python-web-service
5. Install Required Python Packages
pip install -r requirements.txt
6. Start the Python Service
python app.py
or
py app.py
The service will start at:
http://127.0.0.1:5000/
Client-Side Setup (React Application)
1. Navigate to the React Application
cd frontend
2. Install Dependencies
npm install
3. Configure Service URLs
Document Editor
serviceUrl = "http://127.0.0.1:5000/"
4. Start the Application
npm run dev
Open the application using the URL displayed in the terminal.
License
This is a commercial product and requires a paid license for possession or use. Syncfusion's licensed software, including this component, is subject to the terms and conditions of Syncfusion's EULA. You can purchase a license here or start a free 30-day trial here.
About Syncfusion®
Founded in 2001 and headquartered in Research Triangle Park, N.C., Syncfusion® has more than 29,000 customers and more than 1 million users, including large financial institutions, Fortune 500 companies, and global IT consultancies.
Today, we provide 1700+ components and frameworks for web (Blazor, ASP.NET Core, ASP.NET MVC, ASP.NET WebForms, JavaScript, Angular, React, Vue, and Flutter), mobile (Xamarin, Flutter, UWP, and JavaScript, .NET MAUI) and desktop development (WinForms, WPF, WinUI, Flutter, UWP, and .NET MAUI) a. We provide ready-to-deploy enterprise software for dashboards, reports, data integration, and big data processing. Many customers have saved millions in licensing fees by deploying our software.