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

Tooltips showing twice with radeditor

7 Answers 263 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
thepilsbury
Top achievements
Rank 1
thepilsbury asked on 16 Oct 2008, 06:59 PM
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!

7 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 20 Oct 2008, 08:28 AM
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.
0
thepilsbury
Top achievements
Rank 1
answered on 20 Oct 2008, 05:46 PM
Thanks Svetlina, but what if I want to use the tooltipmanager's tooltips instead of the radeditor's tooltips?
0
Tervel
Telerik team
answered on 22 Oct 2008, 11:18 AM
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.
0
Lucania
Top achievements
Rank 1
answered on 10 Feb 2012, 03:57 AM
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
0
Rumen
Telerik team
answered on 13 Feb 2012, 12:30 PM
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 >>
0
Lucania
Top achievements
Rank 1
answered on 14 Feb 2012, 05:43 AM
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.
0
Marin Bratanov
Telerik team
answered on 15 Feb 2012, 12:06 PM
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 >>
Tags
ToolTip
Asked by
thepilsbury
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
thepilsbury
Top achievements
Rank 1
Tervel
Telerik team
Lucania
Top achievements
Rank 1
Rumen
Telerik team
Marin Bratanov
Telerik team
Share this question
or