Hiding button/button group of rad editor with ribbon mode

4 posts, 0 answers
  1. Tonkinpark
    Tonkinpark avatar
    2 posts
    Member since:
    Nov 2011

    Posted 05 Jan 2012 Link to this post

    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 :)
  2. Rumen
    Admin
    Rumen avatar
    14459 posts

    Posted 05 Jan 2012 Link to this post

    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
  3. Tonkinpark
    Tonkinpark avatar
    2 posts
    Member since:
    Nov 2011

    Posted 06 Jan 2012 Link to this post

    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 
  4. Rumen
    Admin
    Rumen avatar
    14459 posts

    Posted 09 Jan 2012 Link to this post

    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
Back to Top