Skip to content

Commit ecb7eb8

Browse files
committed
ApplyLivePreview: add color attributes
1 parent f838248 commit ecb7eb8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/CodeSnip/Views/HighlightingEditorView/HighlightingEditorViewModel.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,15 @@ private void ApplyLivePreview()
231231
if (color.FontStyle != FontStyles.Normal)
232232
colorElem.SetAttributeValue("fontStyle", color.FontStyle.ToString().ToLowerInvariant());
233233

234+
if (color.Underline)
235+
colorElem.SetAttributeValue("underline", "true");
236+
237+
if (color.Strikethrough)
238+
colorElem.SetAttributeValue("strikethrough", "true");
239+
240+
if (color.FontSize.HasValue)
241+
colorElem.SetAttributeValue("fontSize", color.FontSize.Value.ToString());
242+
234243
doc.Root?.AddFirst(colorElem);
235244
}
236245

0 commit comments

Comments
 (0)