Skip to content

Add Text highlight support#20

Open
Vahalas wants to merge 2 commits into
sgolivernet:masterfrom
Vahalas:TextHighlightSupport
Open

Add Text highlight support#20
Vahalas wants to merge 2 commits into
sgolivernet:masterfrom
Vahalas:TextHighlightSupport

Conversation

@Vahalas

@Vahalas Vahalas commented Feb 16, 2017

Copy link
Copy Markdown

I needed the ability to highlight certain blocks of text so I went ahead and added highlight support based on version 0.4.0.

I first tried adding support for setting a background color but that didn't seem to work when the file was rendered in Microsoft Word. The challenge with highlighting is that there's no end tag so any text that's added with a highlight must be wrapped in a group. The code I wrote automatically adds that group. While highlighting in the Rtf spec technically allows different colors to be used I only implemented a stock yellow highlight.

Because I used default parameters (a feature of .NET 4) I had to switch the target version from 2.0 to 4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant