Hi Mukurram,
We have created
a sample solution to meet your requirement. In this sample, we have included the only three required toolbar items in the
Notes Tab by using the toolbarSettings.items property based on the
condition selectedItem.textContent equal to ‘Notes’ . Please find
attached the modified sample and code snippets for your reference.
Here are the code snippets for your reference:
[app.component.ts]
public actionComplete(args: any) {
if (args.requestType == 'openAddDialog' ||
args.requestType == 'openEditDialog') {
var tabObj =
document.getElementById('ganttDefault_Tab').ej2_instances[0];
tabObj.selected
= function (args) {
if (args.selectedItem.textContent
== 'Notes') {
var richTextEditor
=document.querySelector('.e-richtexteditor').ej2_instances[0];
richTextEditor.toolbarSettings
= {items: ['Bold', 'Italic', 'Underline']};
}
}.bind(this);
}
}
|
You can also find a sample demo of the solution
in this Stackblitz link: https://stackblitz.com/edit/angular-4lnh62-f3lh7r?file=app.component.ts,app.component.html
Regards,
Gopinath M