This is a migrated thread and some comments may be shown as answers.

Hiding button/button group of rad editor with ribbon mode

3 Answers 227 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Tonkinpark
Top achievements
Rank 1
Tonkinpark asked on 05 Jan 2012, 07:31 AM
Hi telerik team,
  
        I have a problem for use rad editor with ribbon mode. i need to hide button and button group on ribbon bar. i use tools file for generate toolbar. Can i do that.


thank for advance :)

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 05 Jan 2012, 08:59 AM
Hello,

Have you tried to modify the toolsfile.xml and remove the desired button declarations from it?

You can also try the solution provided in the following article: Removing Toolbar Buttons.

Greetings,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Tonkinpark
Top achievements
Rank 1
answered on 06 Jan 2012, 07:14 AM
Hi Rumen, 

        Thanks for your reply. That link guides to remove button/s from toolbar. It works fine but the problem is it creates a space that doesn't look good. It could be better if we can disable/enable that button. Alternatively if we could remove the group instead of button(this solution would be fine also). If you guide me to solve this problem then I will be very happy. 

For enable/disable button/s  the solution I tried:

http://www.telerik.com/community/forums/aspnet-ajax/editor/enable-toolbar-button-in-preview-mode.aspx

This works on normal mode of Rad Editor only. But It doesn't work with ribbon mode.


N.B. I need the solution for RadEditor with ribbon mode


Thanks once again.
Ton 
0
Rumen
Telerik team
answered on 09 Jan 2012, 02:45 PM
Hi Ton,

You can use the following API to disable a button on the ribbonbar of RadEditor:

var tool = editor.getToolByName("Bold"); 
editor.get_toolAdapter()._setToolEnabled(tool, false);

Here is an example:
<telerik:RadEditor ID="RadEditor1" runat="server" ToolbarMode="RibbonBar" OnClientLoad="OnClientLoad"></telerik:RadEditor>
    <script type="text/javascript">
        function OnClientLoad(editor) {
            var tool = editor.getToolByName("Bold");
            editor.get_toolAdapter()._setToolEnabled(tool, false);
        }
</script>


Regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Editor
Asked by
Tonkinpark
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Tonkinpark
Top achievements
Rank 1
Share this question
or