@Þorvarður --
there is a fundamental difference between highlighting and bookmarks
Indeed, and thank you for pointing it out. I think they can both be useful, and it is nice that NWP gives us both tools to play with.
@martin -- thanks for your suggestions and kind responses to my various bits of feedback!
Here is a macro I devised, based on tips here and elsewhere in the forums, that toggles highlighting on/off:
Code: Select all
$selection = TextSelection.active
$attributes = $selection.firstAttributes
If $attributes.textHighlightColor
Remove Highlight Formatting
Else
$Yellow = Color.newWithRGB255(239, 252, 118)
Set Highlight Color $Yellow
End
It's my very first macro and so could probably be improved! If anyone has suggestions please chime in.
One behavior I wish were different is: If only the first part of my selected text is highlighted (but the remainder is not), this macro will
remove highlight formatting. I'd rather it instead
add highlight formatting ... much like hitting CMD-B
adds bold formatting when only the first part of the selected text is already bold. Does that make sense? Is there a way to do that? If this is getting too much into the weeds, let me know; I can be happy with the above. Thanks again.