Skip to content

Commit 07a3ec8

Browse files
committed
Initial commit
1 parent c1208ff commit 07a3ec8

File tree

9 files changed

+710
-1
lines changed

9 files changed

+710
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# Create-Dynamic-Reusable-Forms-with-Ease-Using-Content-Controls-in-Word-Documents
1+
# Create Dynamic, Reusable Forms with Ease Using Content Controls in Word Documents
22
This repository provides a working example of how to build dynamic, reusable forms using content controls in Word documents with the Syncfusion Document Editor (a.k.a. Word Processor) in a React application. It demonstrates how to design structured forms that adapt to user input and streamline document workflows.

package.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "my-app",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"@syncfusion/ej2-documenteditor": "^30.1.40",
7+
"@syncfusion/ej2-react-documenteditor": "^30.1.40",
8+
"@syncfusion/ej2-react-popups": "^30.1.40",
9+
"@testing-library/dom": "^10.4.0",
10+
"@testing-library/jest-dom": "^6.6.3",
11+
"@testing-library/react": "^16.3.0",
12+
"@testing-library/user-event": "^13.5.0",
13+
"react": "^19.1.0",
14+
"react-dom": "^19.1.0",
15+
"react-scripts": "5.0.1",
16+
"react-select": "^5.10.2",
17+
"web-vitals": "^2.1.4"
18+
},
19+
"scripts": {
20+
"start": "react-scripts start",
21+
"build": "react-scripts build",
22+
"test": "react-scripts test",
23+
"eject": "react-scripts eject"
24+
},
25+
"eslintConfig": {
26+
"extends": [
27+
"react-app",
28+
"react-app/jest"
29+
]
30+
},
31+
"browserslist": {
32+
"production": [
33+
">0.2%",
34+
"not dead",
35+
"not op_mini all"
36+
],
37+
"development": [
38+
"last 1 chrome version",
39+
"last 1 firefox version",
40+
"last 1 safari version"
41+
]
42+
}
43+
}
14.4 KB
Binary file not shown.

public/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<link href="https://cdn.syncfusion.com/ej2/24.2.3/material.css" rel="stylesheet"/>
5+
<meta charset="utf-8" />
6+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1" />
8+
<meta name="theme-color" content="#000000" />
9+
<title>Document Editor</title>
10+
</head>
11+
<body>
12+
<div id="root"></div>
13+
</body>
14+
</html>

src/ContentControlElements.json

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
{
2+
"FullName": {
3+
"title": "Full Name",
4+
"tag": "FullName",
5+
"value": "Enter your full name",
6+
"type": "Text",
7+
"canDelete": true,
8+
"canEdit": true
9+
},
10+
"EmailID": {
11+
"title": "Email Address",
12+
"tag": "EmailID",
13+
"value": "Enter your email address",
14+
"type": "Text",
15+
"canDelete": true,
16+
"canEdit": true
17+
},
18+
"ReviewDate": {
19+
"title": "Date of Review",
20+
"tag": "ReviewDate",
21+
"value": "2025-01-01",
22+
"type": "Date",
23+
"canDelete": false,
24+
"canEdit": false
25+
},
26+
"ProductName": {
27+
"title": "Product Name",
28+
"tag": "ProductName",
29+
"value": "Enter product name",
30+
"type": "Text",
31+
"canDelete": true,
32+
"canEdit": true
33+
},
34+
"ProductCategory": {
35+
"title": "Category",
36+
"tag": "ProductCategory",
37+
"type": "DropDownList",
38+
"value": "Select a category",
39+
"canDelete": true,
40+
"canEdit": true,
41+
"items": [
42+
"Mobiles",
43+
"Electronics",
44+
"Fashion",
45+
"Books",
46+
"Grocery"
47+
]
48+
},
49+
"PurchaseDate": {
50+
"title": "Purchase Date",
51+
"tag": "PurchaseDate",
52+
"value": "2025-01-01",
53+
"type": "Date",
54+
"canDelete": false,
55+
"canEdit": false
56+
},
57+
"OverallRating": {
58+
"title": "Overall Rating (1-5)",
59+
"tag": "OverallRating",
60+
"type": "ComboBox",
61+
"value": "Select rating (1-5)",
62+
"canDelete": false,
63+
"canEdit": false,
64+
"items": [
65+
"1",
66+
"2",
67+
"3",
68+
"4",
69+
"5"
70+
]
71+
},
72+
"ProductQuality": {
73+
"title": "Product Quality",
74+
"tag": "ProductQuality",
75+
"type": "ComboBox",
76+
"value": "Rate product quality",
77+
"canDelete": false,
78+
"canEdit": false,
79+
"items": [
80+
"1",
81+
"2",
82+
"3",
83+
"4",
84+
"5"
85+
]
86+
},
87+
"ValueForMoney": {
88+
"title": "Value for Money",
89+
"tag": "ValueForMoney",
90+
"type": "ComboBox",
91+
"value": "Rate value for money",
92+
"canDelete": false,
93+
"canEdit": false,
94+
"items": [
95+
"1",
96+
"2",
97+
"3",
98+
"4",
99+
"5"
100+
]
101+
},
102+
"EaseOfUse": {
103+
"title": "Ease of Use",
104+
"tag": "EaseOfUse",
105+
"type": "ComboBox",
106+
"value": "Rate ease of use",
107+
"canDelete": false,
108+
"canEdit": false,
109+
"items": [
110+
"1",
111+
"2",
112+
"3",
113+
"4",
114+
"5"
115+
]
116+
},
117+
"ReviewTitle": {
118+
"title": "Review Title",
119+
"tag": "ReviewTitle",
120+
"value": "Enter review title",
121+
"type": "Text",
122+
"canDelete": true,
123+
"canEdit": true
124+
},
125+
"ReviewDetails": {
126+
"title": "Detailed Review",
127+
"tag": "ReviewDetails",
128+
"value": "Write your detailed review",
129+
"type": "RichText",
130+
"canDelete": true,
131+
"canEdit": true
132+
},
133+
"RecommendProduct": {
134+
"title": "Recommend Product",
135+
"tag": "RecommendProduct",
136+
"type": "CheckBox",
137+
"value": "false",
138+
"canDelete": false,
139+
"canEdit": false
140+
}
141+
}

0 commit comments

Comments
 (0)