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

Cursor Style on Design,html and preview buttons

1 Answer 53 Views
Editor
This is a migrated thread and some comments may be shown as answers.
nsrikanth 2009
Top achievements
Rank 1
nsrikanth 2009 asked on 01 Jan 2014, 11:12 AM

Hi,
        We are using radeditor in asp.net application.Can you provide code for changing the cursor style[i.e hand,] from hand to default  on Design,Html and Preview buttons when the editor is disabled.

I need this functionality using javascript and c#.

Please revert back with comments ASAP.

thanks
srikanth

1 Answer, 1 is accepted

Sort by
0
Accepted
Bozhidar
Telerik team
answered on 02 Jan 2014, 02:46 PM
Hi,

To remove the cursor pointer of the disabled Editor, you should use a similar to the following functionality:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <style type="text/css">
        .reEditorModes a.reModeDisabled, .reEditorModes a.reModeDisabled span {
            opacity: .6;
            cursor: default;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadEditor runat="server" OnClientLoad="EditorDisable">
        <Content>
                <p>dfsadfs</p>
        </Content>
    </telerik:RadEditor>
    <script type="text/javascript">
        function EditorDisable(editor, args) {
            editor.enableEditing(false);
            editor.set_editable(false);
 
            $telerik.$(".reMode_design, .reMode_html, .reMode_preview").each(function (index) {
                $telerik.addCssClasses(this, ["reModeDisabled"]);
            });
        }
  
    
    </script>
    </form>
</body>
</html>

When the Editor is disbaled an additional CSS class is added to the buttons and it is used to change the cursor and add some opacity so the buttons to look disabled.

Regards,
Bozhidar
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Editor
Asked by
nsrikanth 2009
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or