/// <summary>
 /// Initializes a new instance of HtmlRenderer.
 /// </summary>
 public HtmlRenderer()
 {
     _contentRendererCollection = new ContentRendererCollection();
     _contentRendererCollection.AddRenderers(new List <IContentRenderer> {
         new ParagraphRenderer(_contentRendererCollection),
         new HyperlinkContentRenderer(_contentRendererCollection),
         new TextRenderer(),
         new HorizontalRulerContentRenderer(),
         new HeadingRenderer(_contentRendererCollection),
         new ListContentRenderer(_contentRendererCollection),
         new ListItemContentRenderer(_contentRendererCollection),
         new QuoteContentRenderer(_contentRendererCollection),
         new AssetRenderer(_contentRendererCollection),
         new NullContentRenderer()
     });
 }
Exemple #2
0
 public HtmlRenderer(HtmlRendererOptions options)
 {
     options ??= new HtmlRendererOptions();
     _contentRendererCollection = new ContentRendererCollection();
     _contentRendererCollection.AddRenderers(new List <IContentRenderer> {
         new ParagraphRenderer(_contentRendererCollection),
         new HyperlinkContentRenderer(_contentRendererCollection),
         new TextRenderer(true),
         new HorizontalRulerContentRenderer(),
         new HeadingRenderer(_contentRendererCollection),
         new TableRenderer(_contentRendererCollection),
         new TableRowRenderer(_contentRendererCollection),
         new TableCellRenderer(_contentRendererCollection),
         new TableHeaderRenderer(_contentRendererCollection),
         new ListContentRenderer(_contentRendererCollection),
         new ListItemContentRenderer(_contentRendererCollection, options.ListItemOptions),
         new QuoteContentRenderer(_contentRendererCollection),
         new AssetRenderer(_contentRendererCollection),
         new NullContentRenderer()
     });
 }
 /// <summary>
 /// Initializes a new QuoteContentRenderer.
 /// </summary>
 /// <param name="rendererCollection">The collection of renderer to use for sub-content.</param>
 public QuoteContentRenderer(ContentRendererCollection rendererCollection)
 {
     _rendererCollection = rendererCollection;
 }
 /// <summary>
 /// Initializes a new ListItemContentRenderer.
 /// </summary>
 /// <param name="rendererCollection">The collection of renderer to use for sub-content.</param>
 public ListItemContentRenderer(ContentRendererCollection rendererCollection)
 {
     _rendererCollection = rendererCollection;
 }
 /// <summary>
 /// Initializes a new HyperlinkContentRenderer.
 /// </summary>
 /// <param name="rendererCollection">The collection of renderer to use for sub-content.</param>
 public HyperlinkContentRenderer(ContentRendererCollection rendererCollection)
 {
     _rendererCollection = rendererCollection;
 }
 /// <summary>
 /// Initializes a new AssetRenderer.
 /// </summary>
 /// <param name="rendererCollection">The collection of renderer to use for sub-content.</param>
 public AssetRenderer(ContentRendererCollection rendererCollection)
 {
     _rendererCollection = rendererCollection;
 }
 /// <summary>
 /// Initializes a new HeadingRenderer.
 /// </summary>
 /// <param name="rendererCollection">The collection of renderer to use for sub-content.</param>
 public HeadingRenderer(ContentRendererCollection rendererCollection)
 {
     _rendererCollection = rendererCollection;
 }
 /// <summary>
 /// Initializes a new PragraphRenderer
 /// </summary>
 /// <param name="rendererCollection">The collection of renderer to use for sub-content.</param>
 public ParagraphRenderer(ContentRendererCollection rendererCollection)
 {
     _rendererCollection = rendererCollection;
 }
 /// <summary>
 /// Initializes a new ListItemContentRenderer.
 /// </summary>
 /// <param name="rendererCollection">The collection of renderer to use for sub-content.</param>
 /// <param name="options">Options for rendering list items</param>
 public ListItemContentRenderer(ContentRendererCollection rendererCollection, ListItemContentRendererOptions options)
 {
     _rendererCollection = rendererCollection;
     _options            = options ?? new ListItemContentRendererOptions();
 }
Exemple #10
0
 /// <summary>
 /// Initializes a new TableCellRenderer
 /// </summary>
 /// <param name="rendererCollection">The collection of renderer to use for sub-content.</param>
 public TableCellRenderer(ContentRendererCollection rendererCollection)
 {
     _rendererCollection = rendererCollection;
 }
Exemple #11
0
 /// <summary>
 /// Initializes a new TableHeaderRenderer
 /// </summary>
 /// <param name="rendererCollection">The collection of renderer to use for sub-content.</param>
 public TableHeaderRenderer(ContentRendererCollection rendererCollection)
 {
     _rendererCollection = rendererCollection;
 }