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

Enable/disable editor

1 Answer 61 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Per Mangseth
Top achievements
Rank 1
Per Mangseth asked on 03 Dec 2008, 08:49 AM
Hi!

I have an Editor on my page. This editor is set to be disabled in pageload, so that the content is displayed with no toolbars, no frames or anything; just the text. However, I have a button that is supposed to set the editor to enabled so that the text can be edited. When I click this button, the editor is enabled, showing the toolbars etc, but the editor is empty (the original text is removed), I can't write in it, and the buttons in the toolbar isn't working.

Is there another way to do this, other than using enabled/disabled?

Cheers,
Erlend Haukland

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 03 Dec 2008, 11:19 AM
Hi Per,

Have you tried the following solution:

<script runat="server">
    protected void Button1_Click(object sender, EventArgs e)
    {
        RadEditor1.Enabled = !RadEditor1.Enabled;
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server" />


            <telerik:RadEditor runat="server"
                ID="RadEditor1">
                <Content>test</Content>
                <DocumentManager ViewPaths="~/images" UploadPaths="~/images" />
            </telerik:RadEditor>
            <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
          
    </form>
</body>
</html>

If you scenario is other, please open a support ticket and send a sample working project that demonstrates the problem. Once we reproduce the problem on our side, we will do our best to provide a solution.

Kind regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Per Mangseth
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or