Skip to content

Commit 55a81e5

Browse files
committed
1009393: Modified the code
1 parent 4500c82 commit 55a81e5

3 files changed

Lines changed: 15 additions & 23 deletions

File tree

Document-Processing/Word/Word-Processor/javascript-es5/how-to/customize-color-picker.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Similarly, you can use [`documentEditorSettings`](https://ej2.syncfusion.com/jav
1616

1717
The following example code illustrates how to Customize the color picker in Document editor container.
1818

19-
```ts
20-
let container: DocumentEditorContainer = new DocumentEditorContainer({ enableToolbar: true,height: '590px',
19+
```js
20+
var documenteditorContainer = new ej.documenteditor.DocumentEditorContainer({ enableToolbar: true,height: '590px',
2121
//Customizing options for color picker.
2222
documentEditorSettings: {
2323
colorPickerSettings: { mode: 'Palette', modeSwitcher: true, showButtons: true },

Document-Processing/Word/Word-Processor/javascript-es5/how-to/customize-ribbon.md

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ Document Editor provides APIs to remove existing File menu items and add new cus
2727
In below code example, In the example below, the "Open" and "Export" items have been removed from the File Menu Items, and new custom items have been added.
2828

2929
```js
30-
import { DocumentEditorContainer, Ribbon } from '@syncfusion/ej2-documenteditor';
3130

32-
var documenteditorContainer = new ej.documenteditor.DocumentEditorContainer({ enableToolbar: true,
31+
var documenteditorContainer = new ej.documenteditor.DocumentEditorContainer({ enabvaroolbar: true,
3332
toolbarMode: 'Ribbon', // Options: 'Ribbon' or 'Toolbar'
3433
ribbonLayout: 'Classic', // Options: 'Simplified' or 'Classic',
3534
fileMenuItems: ["New", "Print", { text: 'Export', id: 'custom_item',iconCss: 'e-icons e-export' }
@@ -52,10 +51,8 @@ The Document Editor provides an [`backStageMenu`](https://ej2.syncfusion.com/jav
5251

5352
The following code example shows how to add the backstage menu items.
5453

55-
```ts
56-
import { DocumentEditorContainer, Ribbon } from '@syncfusion/ej2-documenteditor';
57-
58-
var documenteditorContainer = new ej.documenteditor.DocumentEditorContainer({ enableToolbar: true,
54+
```js
55+
var documenteditorContainer = new ej.documenteditor.DocumentEditorContainer({ enabvaroolbar: true,
5956
toolbarMode: 'Ribbon', // Options: 'Ribbon' or 'Toolbar'
6057
ribbonLayout: 'Classic', // Options: 'Simplified' or 'Classic',
6158
backstageMenu: {
@@ -83,7 +80,7 @@ You can customize the ribbon tabs in the Document Editor by showing, hiding, or
8380
Document editor provides the [`showTab`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor-container/ribbon#showtab) API to show and hide the existing tab using existing `RibbonTabType` and `tabId`.
8481

8582
The following code example how to show/hide existing tab using existing tab type and tab id.
86-
```ts
83+
```js
8784
// To hide the Home tab using the built-in `RibbonTabType`
8885
container.ribbon.showTab('Home', false);
8986

@@ -95,11 +92,9 @@ container.ribbon.showTab('custom_tab', false);
9592

9693
The Document Editor provides the [`addTab`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor-container/ribbon#addtab) API, which allows you to insert a new custom tab either between existing tabs or at the end of the ribbon tabs.
9794

98-
```ts
99-
import { RibbonTabModel } from '@syncfusion/ej2-ribbon';
100-
95+
```js
10196
// To add the tab at end of tab
102-
let ribbonTab: RibbonTabModel = {
97+
var ribbonTab = {
10398
header: 'Custom Tab', id: 'custom_tab', groups: [{
10499
header: 'Custom Group', collections: [{
105100
items: [{
@@ -132,7 +127,7 @@ Document Editor provides an [`showGroup`](https://ej2.syncfusion.com/javascript/
132127

133128
The following code example show how to show/hide the group using group Id or [`RibbonGroupInfo`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor-container#ribbongroupinfo).
134129

135-
```ts
130+
```js
136131

137132
// To hide the clipboard group using group index
138133
container.ribbon.showGroup({tabId: 'Home', index: 1} , false);
@@ -149,12 +144,10 @@ container.ribbon.showGroup('custom_group', false);
149144

150145
To extend the ribbon's functionality, you can add custom groups to any tab. This allows you to organize related commands together within a tab.
151146

152-
```ts
153-
154-
import { RibbonGroupModel } from '@syncfusion/ej2-ribbon';
147+
```js
155148

156149
// Add the new group at the end of the Home tab
157-
let ribbonGroup: RibbonGroupModel =
150+
var ribbonGroup =
158151
{
159152
header: 'Custom Group', collections: [{
160153
items: [{
@@ -187,7 +180,7 @@ Using [`showItems`](https://ej2.syncfusion.com/javascript/documentation/api/docu
187180

188181
The following code example show how to show/hide the item using item Id or [`RibbonItemInfo`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor-container#ribboniteminfo).
189182

190-
```ts
183+
```js
191184
// To hide the Bold and Italic items using ribbon item information
192185
container.ribbon.showItems({ tabId: 'Home', groupIndex: 2, itemIndexes: [5, 6] } , false);
193186

@@ -202,7 +195,7 @@ container.ribbon.showItems('custom_item', false);
202195

203196
Using [`enableItems`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor-container/ribbon#enableitems) API in Document editor ribbon to enable/disable the existing item.
204197

205-
```ts
198+
```js
206199
// To disable the underline using ribbon item info
207200
container.ribbon.enableItems({ tabId: 'Home', groupIndex: 2, itemIndexes: [7] },false);
208201

@@ -218,10 +211,10 @@ container.ribbon.enableItems('custom_item', false);
218211

219212
You can use the [`addItem`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor-container/ribbon#additem) API in the Document Editor ribbon to add a new item. Additionally, you can specify the target tab and group where the new item should be placed.
220213

221-
```ts
214+
```js
222215

223216
// To add the item at the end of the specified group (the item will be added at the end of the Undo group)
224-
let ribbonItem: RibbonItemModel = {
217+
var ribbonItem = {
225218
type: 'Button',
226219
buttonSettings: {
227220
content: 'New',

Document-Processing/Word/Word-Processor/javascript-es5/how-to/set-default-format-in-document-editor.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ You can use [`setDefaultParagraphFormat`](https://ej2.syncfusion.com/javascript/
6464
The following example code illustrates how to change the paragraph format(before spacing, line spacing etc.,) default value in Document editor.
6565

6666
```js
67-
import { ParagraphFormatProperties, DocumentEditorContainer, Toolbar } from '@syncfusion/ej2-documenteditor';
6867

6968
var container = new ej.documenteditor.DocumentEditorContainer({height: "590px" });
7069
container.serviceUrl = 'https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/';

0 commit comments

Comments
 (0)