Problem to load RichTextEditor i Page_Load

Last post 11-14-2013, 9:17 AM by kjell.ek. 1 replies.
Sort Posts: Previous Next
  •  11-14-2013, 2:31 AM 78367

    Problem to load RichTextEditor i Page_Load

     I have mail this and files to [email protected] but no answer.....

    Try here.

     

    I try to load different Security Policy File to Rich Text Editor in Page Load using if Else statement, but i don't have it to work.

    Load different Editor1.Toolbar and Editor1.Width works fine, but not Editor1.SecurityPolicyFile. If i put Editor1.SecurityPolicyFile outside my if statment it works.

    Tips on what is the problem?

     

    You can test the attached code here:

    http://test.junis.org/test/default.aspx?id=3

    http://test.junis.org/test/default.aspx?id=4

     

    ----------------------------------------------------------------------

     

        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

            Editor1.EnableAntiSpamEmailEncoder = True
            Editor1.UseHTMLEntities = False

            Editor1.Skin = "office2003silver2"

            Editor1.EnableObjectResizing = False
            Editor1.EditCompleteDocument = True

            Editor1.PasteMode = RTE.RTEPasteMode.PasteText
            Editor1.ShowPreviewToolbar = False
            Editor1.ShowCodeToolbar = False

            If Not Request.QueryString("id") Is Nothing Then

                If Not IsNumeric(Trim(Request.QueryString("id"))) Then
                    Response.Redirect("../errorhandling/404.aspx")
                Else

                    Dim MyRequestId As Integer = Trim(Request.QueryString("id"))

                    If MyRequestId = 3 Then
                       Editor1.SecurityPolicyFile = "start.config" (does not work)
                       Editor1.Toolbar = "start_toolbar" (works)
                        Editor1.Width = "450" (works)
                    Else
                       Editor1.SecurityPolicyFile = "admin.config" (does not work)
                        Editor1.Toolbar = "admin_toolbar" (works)
                        Editor1.Width = "640" (works)
                    End If

                End If

            End If

        End Sub
     

      
  •  11-14-2013, 9:17 AM 78371 in reply to 78367

    Re: Problem to load RichTextEditor i Page_Load

    Found the bug.  The problem occurs if you insert pages theme in web.config

    Even the Image Editor get problems (editor blank/white) when i use  pages theme in web.config

     
View as RSS news feed in XML