From ccafe03f07091e5b77d42eab9b3ff46d1c874dfc Mon Sep 17 00:00:00 2001 From: Kalaivannan-Ganesan <93248069+Kalaivannan-Ganesan@users.noreply.github.com> Date: Thu, 13 Aug 2026 11:47:32 +0530 Subject: [PATCH] Addressed the corrections from retrieve-the-bookmark-content-as-text.md to section-format.md --- .../retrieve-the-bookmark-content-as-text.md | 46 +++++++------- .../set-default-format-in-document-editor.md | 61 +++++++++---------- .../how-to/show-hide-spinner.md | 10 +-- .../javascript-es5/scrolling-zooming.md | 25 +++----- .../javascript-es5/section-format.md | 25 ++++---- 5 files changed, 79 insertions(+), 88 deletions(-) diff --git a/Document-Processing/Word/Word-Processor/javascript-es5/how-to/retrieve-the-bookmark-content-as-text.md b/Document-Processing/Word/Word-Processor/javascript-es5/how-to/retrieve-the-bookmark-content-as-text.md index 9c8cd3b9e1..942eb84fce 100644 --- a/Document-Processing/Word/Word-Processor/javascript-es5/how-to/retrieve-the-bookmark-content-as-text.md +++ b/Document-Processing/Word/Word-Processor/javascript-es5/how-to/retrieve-the-bookmark-content-as-text.md @@ -3,7 +3,7 @@ layout: post title: Retrieve the bookmark content as text in JavaScript (ES5) Document editor control | Syncfusion description: Learn here all about Retrieve the bookmark content as text in Syncfusion JavaScript (ES5) Document editor control of Syncfusion Essential JS 2 and more. platform: document-processing -control: Retrieve the bookmark content as text +control: Retrieve the Bookmark Content as Text documentation: ug domainurl: ##DomainURL## --- @@ -12,9 +12,9 @@ domainurl: ##DomainURL## You can get the bookmark or whole document content from the [JavaScript DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/javascript-docx-editor) (Document Editor) component as plain text and SFDT (rich text). -## Get the bookmark content as plain text +## Get the Bookmark Content as Plain Text -You can [`selectBookmark`](../bookmark#select-bookmark) API to navigate to the bookmark and use [`text`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/selection#text-code-classlanguage-textstringcode) API to get the bookmark content as plain text from JavaScript Document Editor component. +You can use the [`selectBookmark`](../bookmark#select-bookmark) API to navigate to the bookmark and use the [`text`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/selection#text-code-classlanguage-textstringcode) API to get the bookmark content as plain text from the Document Editor. The following example code illustrates how to get the bookmark content as plain text. @@ -28,27 +28,27 @@ let container: DocumentEditorContainer = new DocumentEditorContainer({ enableToo container.serviceUrl = 'https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/'; container.appendTo('#container'); -// To insert text in cursor position +// To insert text at the cursor position container.documentEditor.editor.insertText('Document editor'); -// To select all the content in document +// To select all the content in the document container.documentEditor.selection.selectAll(); // Insert bookmark to selected content container.documentEditor.editor.insertBookmark('Bookmark1'); -// Provide your bookmark name to navigate to specific bookmark +// Provide your bookmark name to navigate to a specific bookmark container.documentEditor.selection.selectBookmark('Bookmark1'); // To get the selected content as text let selectedContent: string = container.documentEditor.selection.text; ``` -> 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. +N> 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. -To get the bookmark content as SFDT (rich text), please check this [`link`](../how-to/get-the-selected-content#get-the-selected-content-as-sfdt-rich-text) +To get the bookmark content as SFDT (rich text), please refer to this [`link`](../how-to/get-the-selected-content#get-the-selected-content-as-sfdt-rich-text). -## Get the whole document content as text +## Get the Whole Document Content as Text -You can use [`text`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/selection#text-code-classlanguage-textstringcode) API to get the whole document content as plain text from JavaScript Document Editor component. +You can use the [`text`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/selection#text-code-classlanguage-textstringcode) API to get the whole document content as plain text from the Document Editor. The following example code illustrates how to get the whole document content as plain text. @@ -62,20 +62,20 @@ let container: DocumentEditorContainer = new DocumentEditorContainer({ enableToo container.serviceUrl = 'https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/'; container.appendTo('#container'); -// To insert text in cursor position +// To insert text at the cursor position container.documentEditor.editor.insertText('Document editor'); -// To select all the content in document +// To select all the content in the document container.documentEditor.selection.selectAll(); // To get the content as text let selectedContent: string = container.documentEditor.selection.text; ``` -> 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. +N> 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. -## Get the whole document content as SFDT(rich text) +## Get the Whole Document Content as SFDT (Rich Text) -You can use [`serialize`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor#serialize) API to get the whole document content as SFDT string from JavaScript Document Editor component. +You can use the [`serialize`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor#serialize) API to get the whole document content as an SFDT string from the Document Editor. The following example code illustrates how to get the whole document content as SFDT. @@ -89,7 +89,7 @@ let container: DocumentEditorContainer = new DocumentEditorContainer({ enableToo container.serviceUrl = 'https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/'; container.appendTo('#container'); -// To insert text in cursor position +// To insert text at the cursor position container.documentEditor.editor.insertText('Document editor'); // To get the content as SFDT @@ -97,9 +97,9 @@ container.documentEditor.editor.insertText('Document editor'); ``` -## Get the header content as text +## Get the Header Content as Text -You can use [`goToHeader`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/selection#gotoheader) API to navigate the selection to the header and then use [`text`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/selection#text-code-classlanguage-textstringcode) API to get the content as plain text. +You can use the [`goToHeader`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/selection#gotoheader) API to navigate the selection to the header and then use the [`text`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/selection#text-code-classlanguage-textstringcode) API to get the content as plain text. The following example code illustrates how to get the header content as plain text. @@ -113,17 +113,17 @@ let container: DocumentEditorContainer = new DocumentEditorContainer({ enableToo container.serviceUrl = 'https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/'; container.appendTo('#container'); -// To navigate the selection to header +// To navigate the selection to the header container.documentEditor.selection.goToHeader(); -// To insert text in cursor position +// To insert text at the cursor position container.documentEditor.editor.insertText('Document editor'); -// To select all the content in document +// To select all the content in the document container.documentEditor.selection.selectAll(); // To get the selected content as text let selectedContent: string = container.documentEditor.selection.text; ``` -> 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. +N> 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. -Similarly, you can use [`goToFooter`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/selection#gotofooter) API to navigate the selection to the footer and then use [`text`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/selection#text-code-classlanguage-textstringcode) API to get the content as plain text. \ No newline at end of file +Similarly, you can use the [`goToFooter`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/selection#gotofooter) API to navigate the selection to the footer and then use the [`text`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/selection#text-code-classlanguage-textstringcode) API to get the content as plain text. \ No newline at end of file diff --git a/Document-Processing/Word/Word-Processor/javascript-es5/how-to/set-default-format-in-document-editor.md b/Document-Processing/Word/Word-Processor/javascript-es5/how-to/set-default-format-in-document-editor.md index 6a6370284c..a361dda9b9 100644 --- a/Document-Processing/Word/Word-Processor/javascript-es5/how-to/set-default-format-in-document-editor.md +++ b/Document-Processing/Word/Word-Processor/javascript-es5/how-to/set-default-format-in-document-editor.md @@ -10,39 +10,35 @@ domainurl: ##DomainURL## # Set default format in document editor in JavaScript (ES5) DOCX editor -You can set the default character format, paragraph format and section format in [JavaScript DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/javascript-docx-editor) (Document Editor). +You can set the default character format, paragraph format, and section format in [JavaScript DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/javascript-docx-editor) (Document Editor). ## Set the default character format -You can use [`setDefaultCharacterFormat`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor#setdefaultcharacterformat) method to set the default character format. For example, Document editor default font size is 11 and you can change it as any valid value. +You can use [`setDefaultCharacterFormat`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor#setdefaultcharacterformat) method to set the default character format. For example, the Document Editor's default font size is 11 and you can change it to any valid value. -The following example code illustrates how to change the default font size in Document editor. +The following example code illustrates how to change the default font size in the Document Editor. -```ts -import { DocumentEditorContainer, Toolbar } from '@syncfusion/ej2-documenteditor'; - -let container: DocumentEditorContainer = new DocumentEditorContainer({ height: "590px" }); +```js +var container = new ej.documenteditor.DocumentEditorContainer({ height: "590px" }); container.serviceUrl = 'https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/'; -DocumentEditorContainer.Inject(Toolbar); -// Default font size set as 20 +ej.documenteditor.DocumentEditorContainer.Inject(ej.documenteditor.Toolbar); +// Default font size set to 20 container.setDefaultCharacterFormat({ fontSize: 20 }); -container.appendTo('#container'); +container.appendTo('#container'); ``` -> 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. - -Similarly, you can change the required [`CharacterFormatProperties`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/characterFormatProperties) default value. +N> 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. -The following example code illustrates how to change other character format default value in Document editor. +Similarly, you can change the required [`CharacterFormatProperties`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/characterFormatProperties) default values. -```ts -import { CharacterFormatProperties, DocumentEditorContainer, Toolbar } from '@syncfusion/ej2-documenteditor'; +The following example code illustrates how to change the other character format default values in the Document Editor. -let container: DocumentEditorContainer = new DocumentEditorContainer({ height: "590px" }); +```js +var container = new ej.documenteditor.DocumentEditorContainer({ height: "590px" }); container.serviceUrl = 'https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/'; -DocumentEditorContainer.Inject(Toolbar); +ej.documenteditor.DocumentEditorContainer.Inject(ej.documenteditor.Toolbar); // Set default value -let defaultCharacterFormat: CharacterFormatProperties = { +var defaultCharacterFormat = { bold: false, italic: false, baselineAlignment: 'Normal', @@ -55,19 +51,18 @@ container.setDefaultCharacterFormat(defaultCharacterFormat); container.appendTo('#container'); ``` -> 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. +N> 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. ## Set the default paragraph format -You can use [`setDefaultParagraphFormat`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor#setdefaultparagraphformat) API to set the default paragraph format. You can change the required [`ParagraphFormatProperties`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/paragraphFormatProperties) default value. +You can use [`setDefaultParagraphFormat`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor#setdefaultparagraphformat) API to set the default paragraph format. You can change the required [`ParagraphFormatProperties`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/paragraphFormatProperties) default values. -The following example code illustrates how to change the paragraph format(before spacing, line spacing etc.,) default value in Document editor. +The following example code illustrates how to change the paragraph format (before spacing, line spacing, etc.) default values in the Document Editor. ```js - -var container = new ej.documenteditor.DocumentEditorContainer({height: "590px" }); +var container = new ej.documenteditor.DocumentEditorContainer({ height: "590px" }); container.serviceUrl = 'https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/'; - ej.documenteditor.DocumentEditorContainer.Inject(ej.documenteditor.Toolbar); +ej.documenteditor.DocumentEditorContainer.Inject(ej.documenteditor.Toolbar); var defaultParagraphFormat = { beforeSpacing: 8, @@ -76,21 +71,21 @@ var defaultParagraphFormat = { textAlignment: "Center" }; container.setDefaultParagraphFormat(defaultParagraphFormat); -container.appendTo('#container'); +container.appendTo('#container'); ``` -> 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. +N> 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. ## Set the default section format -You can use [`setDefaultSectionFormat`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor#setdefaultsectionformat) API to set the default section format. You can change the required [`SectionFormatProperties`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/sectionFormatProperties) default value. +You can use [`setDefaultSectionFormat`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor#setdefaultsectionformat) API to set the default section format. You can change the required [`SectionFormatProperties`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/sectionFormatProperties) default values. -The following example code illustrates how to change the section format(header and footer distance, page width and height, etc.,) default value in Document editor. +The following example code illustrates how to change the section format (header and footer distance, page width and height, etc.) default values in the Document Editor. ```js -var container = new ej.documenteditor.DocumentEditorContainer({height: "590px" }); +var container = new ej.documenteditor.DocumentEditorContainer({ height: "590px" }); container.serviceUrl = 'https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/'; - ej.documenteditor.DocumentEditorContainer.Inject(ej.documenteditor.Toolbar); +ej.documenteditor.DocumentEditorContainer.Inject(ej.documenteditor.Toolbar); var defaultSectionFormat = { pageWidth: 500, @@ -104,7 +99,7 @@ var defaultSectionFormat = { }; container.setDefaultSectionFormat(defaultSectionFormat); -container.appendTo('#container'); +container.appendTo('#container'); ``` -> 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. \ No newline at end of file +N> 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. \ No newline at end of file diff --git a/Document-Processing/Word/Word-Processor/javascript-es5/how-to/show-hide-spinner.md b/Document-Processing/Word/Word-Processor/javascript-es5/how-to/show-hide-spinner.md index 957ea6fa2f..74f35d96de 100644 --- a/Document-Processing/Word/Word-Processor/javascript-es5/how-to/show-hide-spinner.md +++ b/Document-Processing/Word/Word-Processor/javascript-es5/how-to/show-hide-spinner.md @@ -10,15 +10,15 @@ domainurl: ##DomainURL## # Show hide spinner in JavaScript (ES5) Document editor -Using [`spinner`](https://ej2.syncfusion.com/documentation/spinner/getting-started#create-the-spinner-globally) component, you can show/hide spinner while opening document in [JavaScript DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/javascript-docx-editor) (Document Editor). +Using the [`spinner`](https://ej2.syncfusion.com/documentation/spinner/getting-started#create-the-spinner-globally) component, you can show or hide the spinner while opening a document in [JavaScript DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/javascript-docx-editor) (Document Editor). -Example code snippet to show/hide spinner +The following example shows how to show or hide the spinner. -```ts +```js // showSpinner() will make the spinner visible showSpinner(document.getElementById('container')); -// hideSpinner() method used hide spinner +// hideSpinner() method used to hide spinner hideSpinner(document.getElementById('container')); ``` @@ -35,4 +35,4 @@ Refer to the following example. {% previewsample "/document-processing/code-snippet/document-editor/javascript-es5/spinner-cs1" %} ->Note: In above example, we have used setInterval to hide spinner, just for demo purpose. +N> In the above example, `setInterval` is used to hide the spinner, just for demo purposes. diff --git a/Document-Processing/Word/Word-Processor/javascript-es5/scrolling-zooming.md b/Document-Processing/Word/Word-Processor/javascript-es5/scrolling-zooming.md index 99105be513..f369c6c331 100644 --- a/Document-Processing/Word/Word-Processor/javascript-es5/scrolling-zooming.md +++ b/Document-Processing/Word/Word-Processor/javascript-es5/scrolling-zooming.md @@ -10,7 +10,7 @@ domainurl: ##DomainURL## # Scrolling zooming in JavaScript (ES5) Document editor control -The [JavaScript DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/javascript-docx-editor) (Document Editor) renders the document as page by page. You can scroll through the pages by mouse wheel or touch interactions. You can also scroll through the page by using 'scrollToPage()' method of Document Editor instance. Refer to the following code example. +The [JavaScript DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/javascript-docx-editor) (Document Editor) renders the document page by page. You can scroll through the pages using the mouse wheel or touch interactions. You can also scroll through the page by using the `scrollToPage()` method of the Document Editor instance. Refer to the following code example. {% tabs %} {% highlight js tabtitle="index.js" %} @@ -23,9 +23,9 @@ The [JavaScript DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/javascri {% previewsample "/document-processing/code-snippet/document-editor/javascript-es5/scrolling-zooming-cs1" %} -> Calling this method brings the specified page into view but doesn’t move selection. Hence this method will work by default. That is, it works even if selection is not enabled. +N> Calling this method brings the specified page into view but does not move the selection. Hence this method will work by default. That is, it works even if the selection is not enabled. -In case, if you wish to move the selection to any page in Document Editor and bring it into view, you can use ‘goToPage()’ method of selection instance. Refer to the following code example. +If you wish to move the selection to any page in the Document Editor and bring it into view, you can use the `goToPage()` method of the selection instance. Refer to the following code example. {% tabs %} {% highlight js tabtitle="index.js" %} @@ -40,13 +40,10 @@ In case, if you wish to move the selection to any page in Document Editor and br ## Zooming -You can scale the contents in Document Editor ranging from 10% to 500% of the actual size. You can achieve this using mouse or touch interactions. You can also use ‘zoomFactor’ property of Document Editor instance. The value can be specified in a range from 0.1 to 5. Refer to the following code example. +You can scale the contents in the Document Editor in a range from 10% to 500% of the actual size. You can achieve this using the mouse or touch interactions. You can also use the `zoomFactor` property of the Document Editor instance. The value can be specified in a range from 0.1 to 5. Refer to the following code example. -```ts -import { DocumentEditor } from '@syncfusion/ej2-documenteditor'; - -//Initialize the Document Editor module. -let documenteditor: DocumentEditor = new DocumentEditor({ +```js +var documenteditor = new ej.documenteditor.DocumentEditor({ isReadOnly: false, serviceUrl: 'https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/' }); @@ -60,12 +57,10 @@ documenteditor.zoomFactor = 3; ## Page Fit Type -Apart from specifying the zoom factor as value, the Document Editor provides option to specify page fit options such as fit to full page or fit to page width. You can set this option using ‘fitPage’ method of Document Editor instance. Refer to the following code example. +Apart from specifying the zoom factor as a value, the Document Editor provides the option to specify page fit options such as fit to full page or fit to page width. You can set this option using the `fitPage` method of the Document Editor instance. Refer to the following code example. -```ts -import { DocumentEditor } from '@syncfusion/ej2-documenteditor'; -//Initialize the Document Editor module. -let documenteditor: DocumentEditor = new DocumentEditor({ +```js +var documenteditor = new ej.documenteditor.DocumentEditor({ isReadOnly: false, serviceUrl: 'https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/' }); @@ -79,7 +74,7 @@ documenteditor.fitPage('FitPageWidth'); ## Zoom option using UI -The following code example shows how to provide zoom options in Document Editor. +The following code example shows how to provide zoom options in the Document Editor. {% tabs %} {% highlight js tabtitle="index.js" %} diff --git a/Document-Processing/Word/Word-Processor/javascript-es5/section-format.md b/Document-Processing/Word/Word-Processor/javascript-es5/section-format.md index 951d462e7c..8338629c32 100644 --- a/Document-Processing/Word/Word-Processor/javascript-es5/section-format.md +++ b/Document-Processing/Word/Word-Processor/javascript-es5/section-format.md @@ -10,22 +10,23 @@ domainurl: ##DomainURL## # Section format in JavaScript (ES5) Document editor control -[JavaScript DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/javascript-docx-editor) (Document Editor) supports various section formatting such as page size, page margins, and more. +[JavaScript DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/javascript-docx-editor) (Document Editor) supports various section-format options such as page size, page margins, and more. ## Page size -You can get or set the size of a section at cursor position by using the following sample code. +You can get or set the size of a section at the cursor position by using the following sample code. ```js documenteditor.selection.sectionFormat.pageWidth = 500; documenteditor.selection.sectionFormat.pageHeight = 600; ``` -You can change the orientation of the page by swapping the values of page width and height respectively. +You can change the orientation of the page by swapping the values of page width and height. ## Page margins -Left and right page margin defines the gap between the document content from left and right side of the page respectively. Top and bottom page margins defines the gap between the document content from header and footer of the page respectively. +The left and right page margins define the gap between the document content and the left and right sides of the page, respectively. The top and bottom page margins define the gap between the document content and the header and footer of the page, respectively. + Refer to the following sample code. ```js @@ -35,11 +36,11 @@ documenteditor.selection.sectionFormat.bottomMargin = 10; documenteditor.selection.sectionFormat.topMargin = 10; ``` ->Note: The maximum value of Margin is 1584, as per Microsoft Word application and you can set any value less than or equal to 1584 to this property. If you set any value greater than 1584, then Syncfusion Document editor will automatically reset as 1584. +N> The maximum value of a margin is 1584, per the Microsoft Word application, and you can set any value up to 1584 for this property. If you set any value greater than 1584, the Syncfusion Document Editor will automatically reset it to 1584. ## Header distance -You can define the distance of header content from the top of the page by using the following sample code. +You can define the distance of the header content from the top of the page by using the following sample code. ```js documenteditor.selection.sectionFormat.headerDistance = 72; @@ -47,7 +48,7 @@ documenteditor.selection.sectionFormat.headerDistance = 72; ## Footer distance -You can define the distance of footer content from the bottom of the page by using the following sample code. +You can define the distance of the footer content from the bottom of the page by using the following sample code. ```js documenteditor.selection.sectionFormat.footerDistance = 72; @@ -57,7 +58,7 @@ documenteditor.selection.sectionFormat.footerDistance = 72; You can define the number of columns, column width, and space between columns for the pages in a section. -The following code example illustrates how to define the two columns layout for the pages in a section. +The following code example illustrates how to define a two-column layout for a section. ```js var column = new ej.documenteditor.SelectionColumnFormat(documenteditor.selection); @@ -73,21 +74,21 @@ Explore how to format Word documents with multiple columns using the JavaScript ## Breaks -You can insert column break. The following code example illustrates how to insert a column break. +You can insert a column break. The following code example illustrates how to insert a column break. ```js container.documentEditor.editor.insertColumnBreak(); ``` -You can insert next page section break to start the new section on the next page. +You can insert a next-page section break to start the new section on the next page. -The following code example illustrates how to insert a next page section break. +The following code example illustrates how to insert a next-page section break. ```js container.documentEditor.editor.insertSectionBreak(SectionBreakType.NewPage); ``` -You can insert continuous section break to start the new section on the same page. +You can insert a continuous section break to start the new section on the same page. The following code example illustrates how to insert a continuous section break.