diff --git a/ej2-javascript/document-editor/how-to/customize-tool-bar.md b/ej2-javascript/document-editor/how-to/customize-tool-bar.md index bf138ca58..c14d50357 100644 --- a/ej2-javascript/document-editor/how-to/customize-tool-bar.md +++ b/ej2-javascript/document-editor/how-to/customize-tool-bar.md @@ -25,7 +25,7 @@ DocumentEditorContainer allows you to customize(add, show, hide, enable, and dis let toolItem: CustomToolbarItemModel = { prefixIcon: "e-de-ctnr-lock", tooltipText: "Disable Image", - text: "Disable Image", + text: onWrapText("Disable Image"), id: "Custom" }; @@ -43,6 +43,19 @@ container.toolbarClick = (args: ClickEventArgs): void => { break; } }; + +function onWrapText(text: string): string { + let content: string = ''; + const index: number = text.lastIndexOf(' '); + + if (index !== -1) { + content = text.slice(0, index) + "