showicon not working?

7 posts, 0 answers
  1. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 28 Feb 2009 Link to this post

    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
  2. Rumen
    Admin
    Rumen avatar
    12849 posts

    Posted 04 Mar 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. richamo
    richamo avatar
    59 posts
    Member since:
    Sep 2006

    Posted 17 Sep 2009 Link to this post

    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
  5. richamo
    richamo avatar
    59 posts
    Member since:
    Sep 2006

    Posted 07 Dec 2009 Link to this post

    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

  6. Martin
    Admin
    Martin avatar
    585 posts

    Posted 08 Dec 2009 Link to this post

    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.
  7. richamo
    richamo avatar
    59 posts
    Member since:
    Sep 2006

    Posted 08 Dec 2009 Link to this post

    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
  8. Martin
    Admin
    Martin avatar
    585 posts

    Posted 08 Dec 2009 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017