예제 #1
0
        public string ToHtmlString()
        {
            var html = new StringBuilder();

            html.Append(EditorStart.ToHtml());

            var items = Items.Cast <object>().ToList();

            foreach (var item in items)
            {
                if (item is IHtmlString)
                {
                    html.Append(((IHtmlString)item).ToHtml());
                }
                else
                {
                    html.Append(item);
                }
            }

            if (items.IsEmpty())
            {
                html.Append(DefaultValue.ToHtml());
            }

            html.Append(EditorEnd.ToHtml());

            return(html.ToString());
        }
예제 #2
0
파일: Image.cs 프로젝트: whyleee/EPiBricks
        public string ToHtmlString()
        {
            var imageHtml = ToHtml().IfNotNullOrEmpty() ?? DefaultValue.ToHtml();

            return(string.Concat(EditorStart.ToHtml(), imageHtml, EditorEnd.ToHtml()));
        }
예제 #3
0
        public string ToHtmlString()
        {
            var video = Url.IfNotNullOrEmpty() ?? DefaultValue.ToHtml();

            return(string.Concat(EditorStart.ToHtml(), video, EditorEnd.ToHtml()));
        }