html editor

Dec 5, 2008 at 7:35 PM
Has anyone else noticed that when you create or edit a post in raw html mode and then come back to it in the future the post is blank. You then have to uncheck the raw html mode, hit the back button then it loads up the post, then you check the raw post to get it back into html view. This is a very annoying issue are there any fixes available for this? thanks. 
Dec 8, 2008 at 5:28 PM
Edited Dec 8, 2008 at 5:40 PM
Yes! I am having the same problem.

This issue will be very problematic for us and I would appreciate anyone's tips on solving it.

Thanks
Dec 10, 2008 at 5:49 PM
Edited Dec 10, 2008 at 5:50 PM
I came up with a quick fix for this. If anyone is interested this is what you do. Do the same thing for the Pages.aspx.cs file, except use the (BindPage method instead).

Open the admin/Pages/Add_entry.aspx.cs file and add the following

    // Add this method anywhere
    private void setEditorMode(Post post)
    {
        if (Request.Cookies[RAW_EDITOR_COOKIE] != null)
        {
            txtRawContent.Text = post.Content;
        }
        else
        {
            txtContent.Text = post.Content;
        }
    }


Call the method from BindPost(Guid id) method

private void BindPost(Guid postId)
    {
        Post post = Post.GetPost(postId);

        setEditorMode(post);    <- Place it there and leave everything else

        txtTitle.Text = post.Title;
        txtContent.Text = post.Content;
      
       etc...
}