We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Notes tab customization

In NOTE tab can we give selected options from rich toolbar ? 

i want only first 3 option in toolbar in note tab  as shown in below picture and also NOTES tab content should not be disappeared on switching between tab. 



1 Reply

GM Gopinath Munusamy Syncfusion Team March 2, 2023 02:40 PM UTC

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


Loader.
Live Chat Icon For mobile
Up arrow icon