Tabless Ribbonbar in RadEditor

1 posts, 0 answers
  1. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 05 Mar 2012 Link to this post


    RadControls version

     2012 Q1

    .NET version


    Visual Studio version


    programming language


    browser support

    all browsers supported by RadControls


    Like the RadRibbonBar in your RadEditor, but don't need multiple tabs?

    Just call the following code when the editor load (wire up the OnClientLoad client-side event) and in any resize events you might use that affect the RadEditor's size...

    $telerik.$('.rrbTabs').css('display', 'none'); 

    If you are calling code to resize the RadEditor's size and, hence, the content area's size using code like the following, then don't forget to reduce the value of your 'adjustments' by 30 to account for the space that would have been occupied by the RibbonBar's tabs

    editor.get_element().style.height = containerHeight; 
    editor.get_contentAreaElement().style.height = containerHeight - adjustments; 

    Where adjustments is the difference between the height of the RadEditor and that of the content area which is necessary for the RibbonBar and Mode-switching tabs

    The attached image shows the result.

Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.