﻿using NGM.Forum.Models;

namespace NGM.Forum.ViewModels {
    public class PostBodyEditorViewModel {
        public PostPart PostPart { get; set; }

        public string Text {
            get { return PostPart.Record.Text; }
            set { PostPart.Record.Text = value; }
        }

        public string Format {
            get { return PostPart.Record.Format; }
            set { PostPart.Record.Format = value; }
        }

        public string EditorFlavor { get; set; }
    }
}
﻿using NGM.Forum.Models;

namespace NGM.Forum.ViewModels {
    public class PostBodyEditorViewModel {
        public PostPart PostPart { get; set; }

        public string Text {
            get { return PostPart.Record.Text; }
            set { PostPart.Record.Text = string.IsNullOrWhiteSpace(value) ? value : value.TrimEnd(); }
        }

        public string Format {
            get { return PostPart.Record.Format; }
            set { PostPart.Record.Format = value; }
        }

        public string EditorFlavor { get; set; }
    }
}
Trim end of post on Save. Incase someone hits enter loads and then blows the size of the page. This will stop that.
Trim end of post on Save. Incase someone hits enter loads and then blows the size of the page. This will stop that.
