Skip to content

Commit 19cedf7

Browse files
authored
Update README.md
1 parent d71e229 commit 19cedf7

File tree

1 file changed

+171
-1
lines changed

1 file changed

+171
-1
lines changed

README.md

Lines changed: 171 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,171 @@
1-
Word Processor
1+
# Word Processor Server
2+
3+
The [Syncfusion **Word Processor (also known as Document Editor)**](https://www.syncfusion.com/javascript-ui-controls/js-word-processor?utm_source=docker&utm_medium=listing&utm_campaign=javascript-word-processor-docker) is a component with editing capabilities like Microsoft Word. It is used to create, edit, view, and print Word documents. It provides all the common word processing abilities, including editing text; formatting contents; resizing images and tables; finding and replacing text; importing, exporting, and printing Word documents; and using bookmarks and tables of contents.
4+
5+
This Docker image is the predefined Docker container of Syncfusion’s Word Processor backend. You can deploy it quickly to your infrastructure.
6+
7+
The Word Processor is supported in the [JavaScript](https://www.syncfusion.com/javascript-ui-controls?utm_source=docker&utm_medium=listing&utm_campaign=javascript-word-processor-docker), [Angular](https://www.syncfusion.com/angular-ui-components?utm_source=docker&utm_medium=listing&utm_campaign=javascript-word-processor-docker), [React](https://www.syncfusion.com/react-ui-components?utm_source=docker&utm_medium=listing&utm_campaign=javascript-word-processor-docker), [Vue](https://www.syncfusion.com/vue-ui-components?utm_source=docker&utm_medium=listing&utm_campaign=javascript-word-processor-docker), [ASP.NET Core](https://www.syncfusion.com/aspnet-core-ui-controls?utm_source=docker&utm_medium=listing&utm_campaign=javascript-word-processor-docker), [ASP.NET MVC](https://www.syncfusion.com/aspnet-mvc-ui-controls?utm_source=docker&utm_medium=listing&utm_campaign=javascript-word-processor-docker), and [Blazor](https://www.syncfusion.com/blazor-components?utm_source=docker&utm_medium=listing&utm_campaign=javascript-word-processor-docker) platforms.
8+
9+
## Prerequisites
10+
11+
Have [`Docker`](https://www.docker.com/products/container-runtime#/download) installed in your environment:
12+
13+
* On Windows, install [`Docker for Windows`](https://hub.docker.com/editions/community/docker-ce-desktop-windows).
14+
15+
* On macOS, install [`Docker for Mac`](https://hub.docker.com/editions/community/docker-ce-desktop-windows).
16+
17+
## How to use this Word Processor Docker image
18+
19+
**Step 1:** Pull the word-processor-server image from Docker Hub.
20+
21+
```console
22+
docker pull word-processor-server
23+
```
24+
25+
**Step 2:** Create the docker-compose.yml file with the following code in your file system.
26+
27+
```yaml
28+
version: '3.4'
29+
30+
services:
31+
word-processor-server:
32+
image: syncfusion/word-processor-server:latest
33+
environment:
34+
#Provide your license key for activation
35+
SYNCFUSION_LICENSE_KEY: YOUR_LICENSE_KEY
36+
ports:
37+
- "6002:80"
38+
```
39+
40+
**Note:** Word Processor is a commercial product. It requires a valid [license key](https://help.syncfusion.com/common/essential-studio/licensing/licensing-faq/where-can-i-get-a-license-key?utm_source=docker&utm_medium=listing&utm_campaign=javascript-word-processor-docker) to use it in a production environment. Please replace `LICENSE_KEY` with the valid license key in the `docker-compose.yml` file.
41+
42+
**Step 3:** In a terminal tab, navigate to the directory where you've placed the docker-compose.yml file and execute the following.
43+
44+
```console
45+
docker-compose up
46+
```
47+
48+
Now the Word Processor server Docker instance runs in the localhost with the provided port number `http://localhost:6002`. Open this link in a browser and navigate to the Word Processor Web API `http://localhost:6002/api/documenteditor`. It returns the default get method response.
49+
50+
**Step 4:** Append the Docker instance running the URL `(http://localhost:6002/api/documenteditor)` to the service URL in the client-side Word Processor control. For more information about how to get started with the Word Processor control, refer to this [`getting started page.`](https://ej2.syncfusion.com/javascript/documentation/document-editor/getting-started?utm_source=docker&utm_medium=listing&utm_campaign=javascript-word-processor-docker)
51+
52+
```html
53+
<!DOCTYPE html>
54+
<html xmlns="http://www.w3.org/1999/xhtml">
55+
<head>
56+
<title>Essential JS 2</title>
57+
<!-- EJ2 Document Editor dependent material theme -->
58+
<link href="resources/base/styles/material.css" rel="stylesheet" type="text/css" rel='nofollow' />
59+
<link href="resources/buttons/styles/material.css" rel="stylesheet" type="text/css" rel='nofollow' />
60+
<link href="resources/inputs/styles/material.css" rel="stylesheet" type="text/css" rel='nofollow' />
61+
<link href="resources/popups/styles/material.css" rel="stylesheet" type="text/css" rel='nofollow' />
62+
<link href="resources/lists/styles/material.css" rel="stylesheet" type="text/css" rel='nofollow' />
63+
<link href="resources/navigations/styles/material.css" rel="stylesheet" type="text/css" rel='nofollow' />
64+
<link href="resources/splitbuttons/styles/material.css" rel="stylesheet" type="text/css" rel='nofollow' />
65+
<link href="resources/dropdowns/styles/material.css" rel="stylesheet" type="text/css" rel='nofollow' />
66+
<!-- EJ2 DocumentEditor material theme -->
67+
<link href="resources/documenteditor/styles/material.css" rel="stylesheet" type="text/css" rel='nofollow' />
68+
69+
<!-- EJ2 Document Editor dependent scripts -->
70+
<script src="resources/scripts/ej2-base.min.js" type="text/javascript"></script>
71+
<script src="resources/scripts/ej2-data.min.js" type="text/javascript"></script>
72+
<script src="resources/scripts/ej2-svg-base.min.js" type="text/javascript"></script>
73+
<script src="resources/scripts/ej2-file-utils.min.js" type="text/javascript"></script>
74+
<script src="resources/scripts/ej2-compression.min.js" type="text/javascript"></script>
75+
<script src="resources/scripts/ej2-pdf-export.min.js" type="text/javascript"></script>
76+
<script src="resources/scripts/ej2-buttons.min.js" type="text/javascript"></script>
77+
<script src="resources/scripts/ej2-popups.min.js" type="text/javascript"></script>
78+
<script src="resources/scripts/ej2-splitbuttons.min.js" type="text/javascript"></script>
79+
<script src="resources/scripts/ej2-inputs.min.js" type="text/javascript"></script>
80+
<script src="resources/scripts/ej2-lists.min.js" type="text/javascript"></script>
81+
<script src="resources/scripts/ej2-navigations.min.js" type="text/javascript"></script>
82+
<script src="resources/scripts/ej2-dropdowns.min.js" type="text/javascript"></script>
83+
<script src="resources/scripts/ej2-calendars.min.js" type="text/javascript"></script>
84+
<script src="resources/scripts/ej2-charts.min.js" type="text/javascript"></script>
85+
<script src="resources/scripts/ej2-office-chart.min.js" type="text/javascript"></script>
86+
<!-- EJ2 Document Editor script -->
87+
<script src="resources/scripts/ej2-documenteditor.min.js" type="text/javascript"></script>
88+
</head>
89+
<body>
90+
<!--element which is going to render-->
91+
<div id='DocumentEditor' style='height:620px'>
92+
93+
</div>
94+
<script>
95+
// Initialize DocumentEditorContainer component.
96+
var documenteditorContainer = new ej.documenteditor.DocumentEditorContainer({ enableToolbar: true });
97+
ej.documenteditor.DocumentEditorContainer.Inject(ej.documenteditor.Toolbar);
98+
documenteditorContainer.serviceUrl ="http://localhost:6002/api/documenteditor";
99+
//DocumentEditorContainer control rendering starts
100+
documenteditorContainer.appendTo('#DocumentEditor');
101+
</script>
102+
</body>
103+
</html>
104+
```
105+
106+
## How to configure a spell checker dictionaries path using Docker compose file
107+
108+
**Step 1:** In the `docker-compose.yml` file, you can mount a local directory to a specific path in the container using `volumes` declaration. The command under `volumes` declaration mounts all the files present in the local directory `./data` to the destination directory `/app/data` in the Docker container.
109+
110+
The local directory `./data` means the directory `data` present in the same parent directory of the `docker-compose.yml` file, like the following screenshot.
111+
112+
![The directory containing the 'docker-compose.yml' file and 'data' folder](https://github.com/SyncfusionExamples/Word-Processor-Server-Docker/blob/master/docker-compose-file-directory.png)
113+
114+
Few resource files are included in the default resource directory `/app/Data` of the Word Processor Docker container. You can find the default resource files that are included in this docker image from [GitHub](https://github.com/SyncfusionExamples/Word-Processor-Server-Docker/tree/master/src/ej2-documenteditor-server/Data). You can configure a different directory with your own resource files (required spell check dictionaries, and template documents) based on your needs. If you customize the default resource directory (change in casing, name or directory level), then you must set the modified directory path (assuming `/app/` as home directory) to environment variable `SPELLCHECK_DICTIONARY_PATH` like below.
115+
116+
```yaml
117+
version: '3.4'
118+
services:
119+
word-processor-server:
120+
image: syncfusion/word-processor-server:latest
121+
environment:
122+
#Provide your license key for activation
123+
SYNCFUSION_LICENSE_KEY: YOUR_LICENSE_KEY
124+
SPELLCHECK_DICTIONARY_PATH: data
125+
volumes:
126+
- ./data:/app/data
127+
ports:
128+
- "6002:80"
129+
```
130+
131+
**Step 2:** In the `data` folder, include the dictionary files (.dic, .aff, personal dictionary) and JSON file.
132+
133+
**Note:** For maintaining the custom words from `add to dictionary` option (personal dictionary), place an empty .dic file (e.g.,. customDict.dic file) in the `data` folder.
134+
135+
The JSON file should contain the language-wise spell check dictionary configuration in the following format.
136+
```json
137+
[
138+
{
139+
"LanguadeID": 1036,
140+
"DictionaryPath": "fr_FR.dic",
141+
"AffixPath": "fr_FR.aff",
142+
"PersonalDictPath": "customDict.dic"
143+
},
144+
{
145+
"LanguadeID": 1033,
146+
"DictionaryPath": "en_US.dic",
147+
"AffixPath": "en_US.aff",
148+
"PersonalDictPath": "customDict.dic"
149+
}
150+
]
151+
```
152+
153+
A JSON file is included in the default resource directory `/app/Data` of this Docker image with name `spellcheck.json`. You can add a different file with your own spell check dictionary configurations. If you customize it, then you must set the new file name to environment variable `SPELLCHECK_JSON_FILENAME` in Docker compose file like below,
154+
```yaml
155+
version: '3.4'
156+
157+
services:
158+
word-processor-server:
159+
image: syncfusion/word-processor-server:latest
160+
environment:
161+
#Provide your license key for activation
162+
SYNCFUSION_LICENSE_KEY: YOUR_LICENSE_KEY
163+
SPELLCHECK_DICTIONARY_PATH: data
164+
SPELLCHECK_JSON_FILENAME: spellcheck1.json
165+
volumes:
166+
- ./data:/app/data
167+
ports:
168+
- "6002:80"
169+
```
170+
171+
Kindly refer these getting started pages to create a Word Processor in [`Angular`](https://ej2.syncfusion.com/angular/documentation/document-editor/getting-started/?utm_source=docker&utm_medium=listing&utm_campaign=javascript-word-processor-docker), [`React`](https://ej2.syncfusion.com/react/documentation/document-editor/getting-started/?utm_source=docker&utm_medium=listing&utm_campaign=javascript-word-processor-docker), [`Vue`](https://ej2.syncfusion.com/vue/documentation/document-editor/getting-started/?utm_source=docker&utm_medium=listing&utm_campaign=javascript-word-processor-docker), [`ASP.NET MVC`](https://ej2.syncfusion.com/aspnetmvc/documentation/document-editor/getting-started/?utm_source=docker&utm_medium=listing&utm_campaign=javascript-word-processor-docker), [`ASP.NET Core`](https://ej2.syncfusion.com/aspnetcore/documentation/document-editor/getting-started/?utm_source=docker&utm_medium=listing&utm_campaign=javascript-word-processor-docker), and [`Blazor`](https://blazor.syncfusion.com/documentation/document-editor/getting-started/server-side-application/?utm_source=docker&utm_medium=listing&utm_campaign=javascript-word-processor-docker).

0 commit comments

Comments
 (0)