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

Using Telerk Toolbar images for RadEditor

5 Answers 172 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Jim
Top achievements
Rank 1
Jim asked on 03 May 2018, 04:04 PM
     How can I use one of the Telerik toolbar images for a custom toolbar button?

5 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 04 May 2018, 11:10 AM
Hello,

The syntax is as follow:

.re<customToolName>:before {
    content: "\iconnumber" !important;
}

For example if the tool name is custom2 and you'd like to apply the bold font icon over it use this class:

    <style>
        .reCustom2:before {
            content: "\e601" !important;
        }
    </style>

as shown in the example below


<head runat="server">
    <title></title>
    <style>
        .reCustom2:before {
            content: "\e601" !important;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager runat="server" ID="ScriptManager"></asp:ScriptManager>
        <telerik:RadEditor runat="server"
                 RenderMode="Lightweight"
            ID="RadEditor1">
            <Tools>
                <telerik:EditorToolGroup>
                    <telerik:EditorTool Name="Bold" />
                    <telerik:EditorTool Name="Custom2" />
                    <telerik:EditorTool Name="Custom3" />
                </telerik:EditorToolGroup>
            </Tools>
        </telerik:RadEditor>
    </form>
</body>
</html>


Regards,
Rumen
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Jim
Top achievements
Rank 1
answered on 07 May 2018, 03:56 PM

Thanks Rumen!

Where can I get a list of the icon numbers?

 

-Jim

0
Jim
Top achievements
Rank 1
answered on 07 May 2018, 05:06 PM

The answer you provided doesn't seem to work if RenderMode="Classic"

Is there a different set of icons?

 

0
Accepted
Marin Bratanov
Telerik team
answered on 10 May 2018, 12:03 PM
Hello Jim,

The different render modes use completely different rendeing and images. The Classic mode uses sprites (I'm attaching here one of the editor's), while the lightweight mode uses font icons. You can read more about this here: https://docs.telerik.com/devtools/aspnet-ajax/controls/editor/functionality/toolbars/buttons/set-button-state#set-icons-for-toolbar-button-states.

On a list of icons numbers - you can try the Kendo font library list (https://docs.telerik.com/kendo-ui/styles-and-layout/icons-web) since we share some codebase and fonts with the Kendo widgets but I cannot guarantee 100% parity, you'd have to test things.


Regards,
Marin Bratanov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Jim
Top achievements
Rank 1
answered on 10 May 2018, 05:01 PM

Thanks for the sprites image Marin.  That's exactly what I needed.  It's working now.

 

Thank you!

Tags
Editor
Asked by
Jim
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Jim
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or