/// <summary> /// In HTML konvertieren /// </summary> /// <param name="context">Der Kontext, indem das Steuerelement dargestellt wird</param> /// <returns>Das Control als HTML</returns> public override IHtmlNode Render(RenderContext context) { var html = new HtmlRaw { Html = Html }; return(html); }
protected override void Write(HtmlRaw node) { if (ShouldPretty(node.Parent) && (node.Parent?.Name == "script" || node.Parent?.Name == "style")) { var lines = node.Slice.ToString().Split(new [] { writer.NewLine }, StringSplitOptions.None); for (var i = 0; i < lines.Length; i++) { writer.WriteLine(); WriteIndent(); Write(lines[i]); } } else { base.Write(node); } }
protected override void Write(HtmlRaw node) { }
protected virtual void Write(HtmlRaw node) { Write(node.Slice.ToString()); }
protected override void Write(HtmlRaw node) { Start("#raw"); base.Write(node); FlushDOM(); }