RichEditingIsAvailable is Always False

  •  09-04-2006, 11:40 AM

    RichEditingIsAvailable is Always False

    CuteEditor always appears as a textarea with no toolbars or richtext options. While trying to get to the bottom of this I've noticed that the property RichEditingIsAvailable is False. This has been tested on WinXP SP2, IE6 and IE7 RC1 and EnableClientScript returns True on all machines tested.
     
    Interestingly this only occurs when I'm adding the Editor in the code behind page. If I add it as a control in the designer it works fine but when adding it from the pagebehind file it only generates the textarea.
     
    My CodeBehind code:
     

    Protected WithEvents re As New CuteEditor.Editor

     

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    AddEditor()

    End Sub

    Sub AddEditor()

    Response.Write("Text Before Editor. ")

    ShowAnEditor()

    Response.Write("<br>Text After Editor")

    End Sub

    Private Sub ShowAnEditor()

    Dim SB As New System.Text.StringBuilder

    Dim SW As New StringWriter(SB)

    Dim htmlTW As New HtmlTextWriter(SW)

    re.ID = "editor"

     

    re.RenderBeginTag(htmlTW)

    re.RenderControl(htmlTW)

    re.RenderEndTag(htmlTW)

    response.Write(SB.ToString())

    End Sub

     
     
    Any answers?
View Complete Thread