Skip to content

Commit a7363a4

Browse files
Merge pull request #341 from Syncfusion-Content/hotfix/hotfix-v26.2.4
DOCINFRA-2341_merged_using_automation
2 parents 8d81898 + f8d1c1d commit a7363a4

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

ej2-javascript/document-editor/how-to/customize-tool-bar.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ DocumentEditorContainer allows you to customize(add, show, hide, enable, and dis
2525
let toolItem: CustomToolbarItemModel = {
2626
prefixIcon: "e-de-ctnr-lock",
2727
tooltipText: "Disable Image",
28-
text: "Disable Image",
28+
text: onWrapText("Disable Image"),
2929
id: "Custom"
3030
};
3131

@@ -43,6 +43,19 @@ container.toolbarClick = (args: ClickEventArgs): void => {
4343
break;
4444
}
4545
};
46+
47+
function onWrapText(text: string): string {
48+
let content: string = '';
49+
const index: number = text.lastIndexOf(' ');
50+
51+
if (index !== -1) {
52+
content = text.slice(0, index) + "<div class='e-de-text-wrap'>" + text.slice(index + 1) + "</div>";
53+
} else {
54+
content = text;
55+
}
56+
57+
return content;
58+
}
4659
```
4760

4861
>Note: Default value of `toolbarItems` is `['New', 'Open', 'Separator', 'Undo', 'Redo', 'Separator', 'Image', 'Table', 'Hyperlink', 'Bookmark', 'TableOfContents', 'Separator', 'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break', 'InsertFootnote', 'InsertEndnote', 'Separator', 'Find', 'Separator', 'Comments', 'TrackChanges', 'Separator', 'LocalClipboard', 'RestrictEditing', 'Separator', 'FormFields', 'UpdateFields','ContentControl']`.

0 commit comments

Comments
 (0)