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/customize-ribbon.md
+13-20Lines changed: 13 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,9 +27,8 @@ Document Editor provides APIs to remove existing File menu items and add new cus
27
27
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.
var documenteditorContainer =newej.documenteditor.DocumentEditorContainer({ enableToolbar: true,
54
+
```js
55
+
var documenteditorContainer =newej.documenteditor.DocumentEditorContainer({ enabvaroolbar:true,
59
56
toolbarMode:'Ribbon', // Options: 'Ribbon' or 'Toolbar'
60
57
ribbonLayout:'Classic', // Options: 'Simplified' or 'Classic',
61
58
backstageMenu: {
@@ -83,7 +80,7 @@ You can customize the ribbon tabs in the Document Editor by showing, hiding, or
83
80
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`.
84
81
85
82
The following code example how to show/hide existing tab using existing tab type and tab id.
86
-
```ts
83
+
```js
87
84
// To hide the Home tab using the built-in `RibbonTabType`
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.
@@ -132,7 +127,7 @@ Document Editor provides an [`showGroup`](https://ej2.syncfusion.com/javascript/
132
127
133
128
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).
@@ -187,7 +180,7 @@ Using [`showItems`](https://ej2.syncfusion.com/javascript/documentation/api/docu
187
180
188
181
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).
189
182
190
-
```ts
183
+
```js
191
184
// To hide the Bold and Italic items using ribbon item information
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.
204
197
205
-
```ts
198
+
```js
206
199
// To disable the underline using ribbon item info
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.
220
213
221
-
```ts
214
+
```js
222
215
223
216
// To add the item at the end of the specified group (the item will be added at the end of the Undo group)
0 commit comments