Skip to content

Commit ba26672

Browse files
Merge pull request #582 from Syncfusion-Content/hotfix/hotfix-v26.2.4
DOCINFRA-2341_merged_using_automation
2 parents 386dd25 + 52b9801 commit ba26672

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class AppComponent {
3737
public toolItem: CustomToolbarItemModel = {
3838
prefixIcon: "e-de-ctnr-lock",
3939
tooltipText: "Disable Image",
40-
text: "Disable Image",
40+
text: this.onWrapText("Disable Image"),
4141
id: "Custom"
4242
};
4343
public items = [this.toolItem, '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'];
@@ -49,6 +49,18 @@ export class AppComponent {
4949
break;
5050
}
5151
};
52+
private onWrapText(text: string): string {
53+
let content: string = '';
54+
const index: number = text.lastIndexOf(' ');
55+
56+
if (index !== -1) {
57+
content = text.slice(0, index) + "<div class='e-de-text-wrap'>" + text.slice(index + 1) + "</div>";
58+
} else {
59+
content = text;
60+
}
61+
62+
return content;
63+
}
5264
}
5365
```
5466

0 commit comments

Comments
 (0)