mirror of
https://github.com/xoofx/markdig.git
synced 2026-11-17 09:51:24 +00:00
Option to set controls attribute for MediaLinks
This commit is contained in:
@@ -110,7 +110,10 @@ namespace Markdig.Extensions.MediaLinks
|
||||
{
|
||||
htmlAttributes.AddPropertyIfNotExist("height", Options.Height);
|
||||
}
|
||||
htmlAttributes.AddPropertyIfNotExist("controls", null);
|
||||
if (Options.Controls)
|
||||
{
|
||||
htmlAttributes.AddPropertyIfNotExist("controls", null);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(Options.Class))
|
||||
htmlAttributes.AddClass(Options.Class);
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace Markdig.Extensions.MediaLinks
|
||||
{
|
||||
Width = "500";
|
||||
Height = "281";
|
||||
Controls = true;
|
||||
Class = "";
|
||||
ExtensionToMimeType = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
@@ -90,6 +91,8 @@ namespace Markdig.Extensions.MediaLinks
|
||||
|
||||
public string Height { get; set; }
|
||||
|
||||
public bool Controls { get; set; }
|
||||
|
||||
public string Class { get; set; }
|
||||
|
||||
public Dictionary<string, string> ExtensionToMimeType { get; }
|
||||
|
||||
Reference in New Issue
Block a user