Hide the toolbar when needed

Hi,

There is some option to hide the toolbar of the rich text editor?

I just want to hide it depending on some condition but for the moment the only thing I could do is to set an empty array of "items". This is not enough for me.


thanks


1 Reply 1 reply marked as answer

GK Gunasekar Kuppusamy Syncfusion Team August 20, 2021 10:10 AM UTC

Hi Ezequiel,

Greetings from Syncfusion support.

We have validated your reported query "There is some option to hide the toolbar of the rich text editor? I just want to hide it depending on some condition"

Yes, we can hide and show the RichTextEditor Toolbar dynamically using the enable property of toolbarSettings API.

We have prepared a sample for your reference.

Code snippets:
public HideBtnClick = (): void => {
    this.rteObj.toolbarSettings.enable = false;
}

public ShowBtnClick = (): void => {
    this.rteObj.toolbarSettings.enable = true;
}

Samplehttps://stackblitz.com/edit/angular-cvuxhr?file=app.component.ts

Please check the sample and let us know if the solution meets your requirement

Regards,
Gunasekar


Marked as answer
Loader.
Up arrow icon