Hi Omer, I love your Onetastic work. So I just wanted to follow-up with this Onenote bug since it's been 2 years.
If you do something like the following Onetastic script:
For each Text in Current Page
If property(hyperlink) is not equal to ""
Modify property(fontSize) --> Set it to "20"
Modify property(highlightColor) --> Set it to "green"
Modify property(fontColor) --> Set it to "red"
Modify property(italic) --> Set it to "true"
Modify property(selected) --> Set it to "true"
Else
Modify property(selected) --> Set it to "false"
It will find all hyperlinks and try to change size, color, highlight, italics and cause these links to be selected. However, upon Onenote.UpdatePageContent( ), the fontColor and italics styling will actually
get stripped out. The size, highlights, and selection will remains At this point with all hyperlinks still selected, the user can manually change the italics and color using the UI.
However, if at any point in the future Onenote.UpdatePageContent ( ) gets called again from this script, another Onetastic script, Onenote Spy, or some other external program, then all the links will once again lose their color and italics, that the user manually
had changed (the hyperlink current size, highlight, and selection status will still remain unaffected)
I guess my question is, why are certain style elements being stripped out after every UpdatePageContent call. While it is fine to strip these elements out when the casual user pastes content from the clipboard since RichText content (especially from the
web) can have undesirable CSS styles. However, it is less adequate to strip these elements out when an external tool changes the current outline element. Power users tend to be the only ones that use external tools, and therefore, they shouldn't be subjected
to the excess filtering the casual user might enjoy.
Thanks for your hard work.