Cursor Style on Design,html and preview buttons

2 posts, 1 answers
  1. nsrikanth 2009
    nsrikanth 2009 avatar
    39 posts
    Member since:
    Apr 2010

    Posted 01 Jan 2014 Link to this post

    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

  2. Answer
    Bozhidar
    Admin
    Bozhidar avatar
    693 posts

    Posted 02 Jan 2014 Link to this post

    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.
Back to Top