public string WrapWithCss(string html, bool withImgCss = true, int?minWidth = null) { if (string.IsNullOrWhiteSpace(html)) { return(string.Empty); } if (string.IsNullOrEmpty(ReplacedCss)) { PrepareCss(); } var css = withImgCss ? ReplacedCss.Insert(0, minWidth == null ? ReplacedCssHtmlBodyScrollEnabled : ReplacedCssHtmlBodyMinWidth.Replace("MinimalWidth", minWidth.Value.ToString())) : ReplacedCss.Substring(320).Insert(0, minWidth == null ? ReplacedCssHtmlBodyScrollEnabled : ReplacedCssHtmlBodyMinWidth.Replace("MinimalWidth", minWidth.Value.ToString())); if (!Settings.ArticlesDisplayScrollBar) { css += CssRemoveScrollbar; } css += "</style>"; return(css + ReplacedBegin + html + End); }
public static string WrapWithCss(string html, bool disableScroll = false) { if (string.IsNullOrWhiteSpace(html)) { return(string.Empty); } var css = ReplacedCss.Insert(0, ReplacedCssHtmlBodyScrollEnabled); if (!Settings.ArticlesDisplayScrollBar) { css += CssRemoveScrollbar; } css += "</style>"; return(css + Begin + html + End); }