You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Document-Processing/Word/Word-Processor/javascript-es5/how-to/change-document-view.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,8 @@ domainurl: ##DomainURL##
14
14
15
15
DocumentEditor allows you to change the view to web layout and print using the [`layoutType`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor#layouttype/) property with the supported [`LayoutType`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/layoutType/).
16
16
17
-
```ts
18
-
let docEdit:DocumentEditor=newDocumentEditor({ layoutType: 'Continuous'});
17
+
```js
18
+
var docEdit=newej.documenteditor.DocumentEditor({ layoutType:'Continuous'});
19
19
```
20
20
21
21
>Note: Default value of [`layoutType`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor#layouttype/) in DocumentEditor component is [`Pages`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/layoutType/).
@@ -24,8 +24,8 @@ let docEdit: DocumentEditor = new DocumentEditor({ layoutType: 'Continuous'});
24
24
25
25
DocumentEditorContainer component allows you to change the view to web layout and print using the [`layoutType`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor#layouttype/) property with the supported [`LayoutType`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/layoutType/).
26
26
27
-
```ts
28
-
let container:DocumentEditorContainer=newDocumentEditorContainer({ layoutType: "Continuous" });
27
+
```js
28
+
var container=newej.documenteditor.DocumentEditorContainer({ layoutType:"Continuous" });
29
29
```
30
30
31
31
>Note: Default value of [`layoutType`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor#layouttype/) in DocumentEditorContainer component is [`Pages`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/layoutType/).
The following code shows how to hide/show added custom option in context menu using the [`customContextMenuBeforeOpen`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/beforeOpenCloseCustomContentMenuEventArgs/).
79
83
80
-
```ts
81
-
let documentEditor:DocumentEditor=newDocumentEditor({
84
+
```js
85
+
var documentEditor=newej.documenteditor.DocumentEditor({
Copy file name to clipboardExpand all lines: Document-Processing/Word/Word-Processor/javascript-es5/how-to/customize-tool-bar.md
+7-11Lines changed: 7 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,39 +20,35 @@ DocumentEditorContainer allows you to customize(add, show, hide, enable, and dis
20
20
21
21
* Enable, Disable - Toolbar items can be enabled or disable using [`enableItems`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor-container/toolbar/#enableItems)
22
22
23
-
```ts
24
-
let toolItem:CustomToolbarItemModel= {
23
+
```js
24
+
var toolItem = {
25
25
prefixIcon:"e-de-ctnr-lock",
26
26
tooltipText:"Disable Image",
27
27
text:onWrapText("Disable Image"),
28
28
id:"Custom"
29
29
};
30
-
31
30
//Initialize Document Editor Container component with custom toolbar item.
32
-
let container:DocumentEditorContainer=newDocumentEditorContainer({
31
+
var container=newej.documenteditor.DocumentEditorContainer({
Copy file name to clipboardExpand all lines: Document-Processing/Word/Word-Processor/javascript-es5/how-to/deploy-document-editor-component-for-mobile.md
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,31 +18,29 @@ Hence, it is recommended to switch the Document editor component as read-only in
18
18
19
19
The following example code illustrates how to deploy Document Editor component for Mobile.
let isMobileDevice:bool=/Android|Windows Phone|webOS/i.test(navigator.userAgent);
31
+
var isMobileDevice =/Android|Windows Phone|webOS/i.test(navigator.userAgent);
34
32
35
-
container.documentChange=() => {
33
+
container.documentChange=function () {
36
34
if (isMobileDevice) {
37
35
container.restrictEditing=true;
38
-
setTimeout(() => {
36
+
setTimeout(function () {
39
37
container.documentEditor.fitPage("FitPageWidth");
40
38
}, 50);
41
39
}
42
40
else {
43
41
container.restrictEditing=false;
44
42
}
45
-
}
43
+
};
46
44
```
47
45
48
46
> The Web API hosted link `https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/` utilized in the Document Editor's serviceUrl property is intended solely for demonstration and evaluation purposes. For production deployment, please host your own web service with your required server configurations. You can refer and reuse the [GitHub Web Service example](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) or [Docker image](https://hub.docker.com/r/syncfusion/word-processor-server) for hosting your own web service and use for the serviceUrl property.
0 commit comments