Importing HTML with "a:link" CSS style will be applied to the text in a bookmark. Here is example of such HTML:
<html>
<head>
<style type="text/css">
a:link {
text-decoration: underline;
}
</style>
</head>
<body>
<a name="anchor">Anchor element</a>
</body>
</html>
A possible workaround is to select the content between the bookmarks and apply different underline decoration. Here is example of how this could be done:
List<BookmarkRangeStart> bookmarks = document.EnumerateChildrenOfType<BookmarkRangeStart>().ToList();
foreach (var rangeStart in bookmarks)
{
document.Selection.Clear();
var start = new DocumentPosition(document);
start.MoveToEndOfDocumentElement(rangeStart);
var end = new DocumentPosition(document);
end.MoveToEndOfDocumentElement(rangeStart.End);
document.Selection.AddSelectionStart(start);
document.Selection.AddSelectionEnd(end);
RadDocumentEditor editor = new RadDocumentEditor(document);
editor.ChangeUnderlineDecoration(UI.TextDecorations.DecorationProviders.UnderlineTypes.None);
}
document.Selection.Clear();