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

[Solved] Enable \ disable editor on client in script

5 Answers 233 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Clayton
Top achievements
Rank 1
Clayton asked on 06 Nov 2007, 08:15 PM
I see that you can enable \ disable the client on the server via the .enabled property, but I want to switch between editor and the HTML in the page without a postback (save via AJAX, etc).

Is this possible with Prometheus?  Code example pls.

5 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 07 Nov 2007, 09:39 AM
Hi Clayton,

If you put RadEditor Prometheus inside an AJAX UpdatePanel than you will be able to switch between editor and the HTML without a PostBack:

    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
       <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
           <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
            <telerik:radeditor runat="server" ID="RadEditor1"></telerik:radeditor>
        </ContentTemplate>
    </asp:UpdatePanel>
   
    <script type="text/C#" runat="server">
    protected void Button1_Click(object sender, EventArgs e)
    {
        RadEditor1.Enabled = !RadEditor1.Enabled;
    }
    </script>

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Clayton
Top achievements
Rank 1
answered on 08 Nov 2007, 09:38 PM
Rumen, thanks for the quick response.

This is not a full page postback, but still an AJAX async call back to the server. I need a client only solution.

I know it might not be there today, but I am trying to understand if it is planned or can be prioritized? 
0
Tervel
Telerik team
answered on 09 Nov 2007, 08:53 AM
Hi Clayton,

There is a function called EnableEditing that exists in the Editor non-Prometheus edition, and is to be ported to the Prometheus edition. The updated functionality will appear in the next Prometheus update .

At this point we are not able to confirm an exact date for the update, as the Prometheus suite involves 10 controls and official updates require additional synchronization.

For the time being, one possible clientside solution would be to hide the editor's wrapper element [or event its content area] on the client by setting style.visibility = "hidden" to prevent the user from typing into the editor.  
Let us know if this suggestion will work for you, and in case you need additional assistance to implement it.


Best regards,
Tervel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Clayton
Top achievements
Rank 1
answered on 05 Dec 2007, 12:18 AM
I just installed the Nov drop for Prometheus and I still don't see the EnableEditing method. 

Has it been renamed or will it come in Dec?
0
Tervel
Telerik team
answered on 05 Dec 2007, 07:44 AM
Hi Clayton,

The enableEditing method will appear in RadEditor Prometheus with the official Q3 release scheduled for Dec 17th.

Best wishes,
Tervel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Editor
Asked by
Clayton
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Clayton
Top achievements
Rank 1
Tervel
Telerik team
Share this question
or