Question
Tata Consultancy Services Ltd
AU
Last activity: 25 Jun 2018 3:00 EDT
Rich Text Editor Control - Hide Tool bar Controls
Hi All,
Is it possible to hide the toolbar icons in UI while using Rich text editor control?
Configuration:
As part of the control, Show Tool bar check box option is not selected. But Tool Bar is displayed on UI.
Any suggestions?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
Hello,
You can have a look into my use case where i tried to hide the toolbar for the Rich Text Editor using inline style as it is not possible OOTB way.
Let me know if this helps you.
Regards
Mahesh
-
Kevin Zheng Vince Leonardis Abhilash Kaligotla Aayush Shah Bharathan T
Tata Consultancy Services Ltd
AU
Thanks a lot Mahesh! I will check and do the necessary changes if required.
Pegasystems Inc.
IN
Hi,
Thanks for posting on PSC.
If you do not need toolbar, you can simply use Text area control than RTE.
Hide toolbar option is available for read only RTE, but it will always show toolbar for other than read-only mode. As a work around, you can set value of "pyShowToolbar" property to '1' which will hide the toolbar. Do remember, it will have an application wide impact.
Hope this will help!
Cheers!
Gurpreet
Tata Consultancy Services Ltd
AU
Thank you Gurpreet for the valuable suggestion.
I will consider Text Areas control instead of RTE for the highlighted scenario (ideal approach).
Temporarily, I was not able to hide the toolbar in RTE after setting the pyShowToolbar to 1 or 0.
Is any further configuration required to hide the Toolbar?
Pegasystems Inc.
US
I'm with Gurpreet, if you are trying to hide the toolbar for an editable RTE, then an RTE is not the right control choice for you. Can you better describe your business requirements that have lead you down this path/idea?
Schwab
IN
we need to hide everything apart from Bold, Italic and Underline from rich text editor. With above mentioned approach, we were able to hide. But we have 2 issues,
We need to hide for every span tag, so if there are multiple rich text editor then code to hide is required for every RTE.
Also if section which contains rich text editor is refreshed, then all options are visible again. Any pointers to solve this?
Pegasystems Inc.
US
Hi,
I added the below code in userworkform and the all the icons got hidden.
<style>
#rte-default .cke_top {
display: none;
}
</style>
However, this might not solve the complete issue. I could still use Ctrl+B to mark the alphabets to be bold. Do you want to disable that as well?
Also, what I failed to understand is why do you want you to hide these icons because the sole purpose of RTE is to have those icons and use them accordingly.
There is alternative such as text area to that. Please let me know if I misunderstood something.
Regards,
Rachit
Schwab
IN
Thanks for your reply. We have a functionality where user will compose a letter. As a part of this they want to use bold and underline to enrich content of the letter.
To avoid formatting issues, we want to hide all other options in rich text editor. Also above mentioned solution will fail if we use keyboard short cuts. But that can be handled through user training if there is no alternative solution.
Can you please suggest easy way to hide only certain options in RTE?
-
Nuwan Dissanayake Piyush Tiwari
Pegasystems Inc.
US
Hi,
Please use the below code in userworkform and let me know the results.
<style>
.cke_combo, .cke_button__textcolor, .cke_button__bgcolor, .cke_button__bulletedlist, .cke_button__numberedlist, .cke_button__copyformatting, .cke_button__removeformat
{
display:none !important;
}
</style>
Regards,
Rachit