Tooltips showing twice with radeditor

8 posts, 0 answers
  1. thepilsbury
    thepilsbury avatar
    36 posts
    Member since:
    Jan 2007

    Posted 16 Oct 2008 Link to this post

    I have a radeditor and a tooltipmanager control on a page. The buttons on the radeditor control display both the tooltip from the tooltipmanager and the normal tooltip from the radeditor button (although the text of the 'normal' tooltip is showing the button name). I'd rather just hae one or the other not two tooltips showing at the same time!
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 20 Oct 2008 Link to this post

    Hello thepilsbury,

    In order to show only the standard tooltip you should set the RadToolTipManager's Autotootipify property to false.

    Best wishes,
    Svetlina
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. thepilsbury
    thepilsbury avatar
    36 posts
    Member since:
    Jan 2007

    Posted 20 Oct 2008 Link to this post

    Thanks Svetlina, but what if I want to use the tooltipmanager's tooltips instead of the radeditor's tooltips?
  5. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 22 Oct 2008 Link to this post

    Hello thepilsbury,

    At present it is not possible to eliminate the two tooltips by setting a property, so we designed a simple hack. Please add the following code that will override the RadToolTipManager's initialize method and force it to execute with a small delay. This results in the desired behavior.

    <script> 
    var managerPrototype = Telerik.Web.UI.RadToolTipManager.prototype; 
    managerPrototype.old_initialize = managerPrototype.initialize;   
    managerPrototype.initialize = function(element) 
    {          
         window.setTimeout(Function.createDelegate(thisfunction() 
         { 
           this.old_initialize(element);             
         }),0); 
    </script> 

    We have modified the RadEditor code, and the Q3 release will feature a properly working version that will not need any hacks. However, please make sure that you set the RadToolTipManager AutoTooltipify = "true"
    explicitly, as it will not be true by default anymore.


    Greetings,
    Tervel
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Lucania
    Lucania  avatar
    65 posts
    Member since:
    May 2011

    Posted 09 Feb 2012 Link to this post

    Hi,

    I have a site that is using Qtip for tooltips, automatically generating tooltips based on the title attribute of controls. With RadEditor, the toolbar buttons display nice tooltips, but the text area displays a tooltip "Rich text editor with ID:" and the control's HTML ID, which isn't really useful, is there any way to change what radeditor puts in the title attribute of it's text box?

    Note, if we set the Tooltip attribute, we get the double tooltips like the original poster.

    Thanks
  7. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 13 Feb 2012 Link to this post

    Hello,

    The issue comes from the fact that in order to make the editor standard compliant and accessible we had to add a title attribute to the IFRAME which is the content area. When the tooltip manager has AutoToolTipify set to true, it replaces the title attributes with RadToolTips and thus this title attributes gets displayed in a RadToolTip.

    What I can suggest as a quick fix for this case is to handle the OnClientLoad event of the editor and to remove the title from the content area as shown below:

    Copy Code
    <script type="text/javascript">
    function OnClientLoad(sender, args)
    {
       var contentArea = sender.get_contentAreaElement();
       contentArea.removeAttribute("title");
    }
    </script>
    <telerik:RadEditor ID="RadEditor1" runat="server" OnClientLoad="OnClientLoad">
    </telerik:RadEditor>



    Greetings,
    Rumen
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  8. Lucania
    Lucania  avatar
    65 posts
    Member since:
    May 2011

    Posted 13 Feb 2012 Link to this post

    Thanks Rumen, that worked fine.

    Might I suggest an enhancement, provide a Tooltip property for the RadEditor control, which if set, is used for the title attribute, otherwise use the current default title?

    Thanks again.
  9. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 15 Feb 2012 Link to this post

    Hello,

    You can change the tooltips for the iframe and its body element with the following simple script:
    <script type="text/javascript">
        function OnClientLoad(sender, args)
        {
            setTimeout(function ()
            {
                sender.get_contentAreaElement().setAttribute("title", "your tooltip");
                sender.get_document().body.setAttribute("title", "your tooltip");
            },0);
        
    </script>
    <telerik:RadEditor ID="RadEditor1" runat="server" OnClientLoad="OnClientLoad">
    </telerik:RadEditor>

    You can, optionally, simply remove the tooltip if you so desire.

    Regards,
    Marin
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017