Tabless Ribbonbar in RadEditor

Thread is closed for posting
1 posts, 0 answers
  1. CE8FD5B8-D57F-4131-8A9A-47DA58D4A301
    CE8FD5B8-D57F-4131-8A9A-47DA58D4A301 avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 05 Mar 2012 Link to this post

    Requirements

    RadControls version

     2012 Q1

    .NET version

     4.0

    Visual Studio version

     2010

    programming language

     C#

    browser support

    all browsers supported by RadControls


    PROJECT DESCRIPTION

    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'); 
    $telerik.$('.reToolbarWrapper').height(98); 
    $telerik.$('.RadRibbonBar').height(91); 

    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.