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

showicon not working?

6 Answers 44 Views
Editor
This is a migrated thread and some comments may be shown as answers.
ManniAT
Top achievements
Rank 2
ManniAT asked on 28 Feb 2009, 09:32 PM
Hi,

I'm implementing the first time a more complex use of rad-editor.
For this reason I took the "FullSetOfTools.xml" from the samples and modified it.

My approach was for the InsertSnippet Tool to display only the Text.
So I modified the tool line to
<tool name="InsertSnippet" showicon="false" showtext="true" /> 
Now I have a "mixed mode" - which means I have the text AND the icon still displayed!!

Did I make a mistake? Or am I missing something?
OR - is it a bug???

By the way - is it possible (via Tools.xml) to have a thing looking like "Custom Links" (Dropdown) - but instead of Links display some
"Snippets". - That is the Reason why I tried to change the InsertSnippet.
And a second question - is it possible to have multiple of these things?

So that I have (for an example) an InsertSnippet for let's say "Animal Names" and another one for "Plant Names"?

Regards

Manfred

6 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 04 Mar 2009, 05:09 PM
Hello Manfred,

This is not a bug because the InsertSnippet does not offer the ability to hide its icon via the showicon property. What you can do is to implement a custom dropdown as it is shown in the following help article: Custom Dropdowns. If you want to add a treeview inside a custom tool then you can see the following KB article:
Integrating RadTreeView in a custom dropdown of RadEditor v5.x - v7.x, "Prometheus".

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
richamo
Top achievements
Rank 2
answered on 17 Sep 2009, 08:39 AM
Hi,

I am also trying to achieve "text-only buttons". I am using the toolsFile manner and using the xml attributes : showicon and showtext and I can't get it working. This was working some time ago (maybe during non-Prometheus times).

Help is greatly appreciated.

Thanks

Morgan

[EDIT]

I have seached a little bit using reflector. RadEditor during its rendering phase rebuild all (button type) EditorTool using this constructor :
public EditorTool(EditorTool tool) 
    this.Name = tool.Name; 
    this.ShortCut = tool.ShortCut; 
    this.Visible = tool.Visible; 
    this.Enabled = tool.Enabled; 
    this.Text = tool.Text; 
    this.ShowText = tool.ShowText; 
 
  
 
  
 

ShowIcon is not "cloned" here (its defaultValue is true) and then the rendering code is ok and uses ShowIcon property value :

protected virtual void RenderToolIcon(HtmlTextWriter writer) 
    if (this.ShowIcon) 
    { 
        this.AddSpanAttributes(writer); 
        writer.RenderBeginTag(HtmlTextWriterTag.Span); 
        writer.Write("&nbsp;"); 
        writer.RenderEndTag(); 
    } 
 
  
 
  
 
Bye
0
richamo
Top achievements
Rank 2
answered on 07 Dec 2009, 02:00 PM
Hi,

I've downloaded and installed Q3.2009 and the problem is still here.
I've added dedicated css classes to prevent the icon from showing :
.MyToolName
{
display: none !important;
}

I was hoping this problem to be solved in the Q3.2009 version.

Bye

Morgan

0
Martin
Telerik team
answered on 08 Dec 2009, 08:19 AM
Hello Morgan,

Please, try the following:

1. Add these two CSS rules in the <head /> section of your page or in your stylesheet:

<style type="text/css">
.reTool_text span
{
 display: none !important;
}

.reTool_text span.reButton_text
{
 display: block !important;
}
</style>

2. And the following RadEditor declaration:

<telerik:RadEditor runat="server">
 <Tools>
  <telerik:EditorToolGroup>
   <telerik:EditorTool Name="Cut" ShowIcon="false" Text="Cut" ShowText="true" />
   <telerik:EditorTool Name="Copy" ShowIcon="false" Text="Copy" ShowText="true" />
   <telerik:EditorTool Name="Paste" ShowIcon="false" Text="Paste" ShowText="true" />
  </telerik:EditorToolGroup>
 </Tools>
</telerik:RadEditor>

Best wishes,
Martin Ivanov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
richamo
Top achievements
Rank 2
answered on 08 Dec 2009, 08:36 AM
Hi Martin,

Thanks for the quick answer. I haven't tested the code for now. Actually, I was hoping that just telling ShowIcon=false would suffice, the trick you provide is just a hack according to me, the problem is still not solved. I will ask for the fix in a support ticket.

Bye

Morgan
0
Martin
Telerik team
answered on 08 Dec 2009, 09:40 AM
Hello Morgan,

The issue you have reported will be escalated, and I believe that it will be fixed in one of the nightly builds.

As of the CSS I gave you earlier today - I would not call it a hack, but rather a temporary fix, and actually a similar CSS selector will be used once the functionality that is expected with that particular setup (ShowIcon="false", ShowText="true") is implemented.


Regards,
Martin Ivanov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Editor
Asked by
ManniAT
Top achievements
Rank 2
Answers by
Rumen
Telerik team
richamo
Top achievements
Rank 2
Martin
Telerik team
Share this question
or