-
-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply style to page will mess with the footnote style #692
Comments
For latest version 5.3-Beta |
There still be a little problem based on the latest commit #695. The footnote num and "刷新"(refresh) are blue, while after applying the style they become text color. I tried to modify the source code of OneMore but failed. |
That cannot be fixed. See the comment here. OneMore is not applying color to the hyperlink but OneNote is and I can't seem to prevent that. |
I don't know much about this field, but I think it should work if put OneMore/OneMore/Commands/Styles/ApplyStylesCommand.cs Lines 72 to 76 in 902cf77
Lines 1008 to 1011 in 902cf77
|
ApplyToHyperlinks and most of the rest of that code just update an in-memory copy of the page XML. It's UpdatePageContent that actually sends that XML back to OneNote to be saved. So it must be the last function call. |
Why can change the color of text through OneNote itself, page doesn't seem to reload, and it does work in its XML. |
It's just the way Microsoft implement it. The OneNote UI seems to update the page differently than the Interop API that they've published for plugins like OneMore. It's all OneMore has available to use. |
There seems to be a way here.
|
No, quickstyles should be preserved for OneNote built-in styles and the OneMore custom styles. You're implying fabricating a quickstyle just to prevent a hyperlink from changing color but that quickstyle wouldn't be related to any style that the user could change via the UI. This is not a good solution. Ostensibly, this is working as intended. It doesn't look 100% correct, but it's doing what it should do - at least as far as the Interop API allows. There's nothing left to do here. |
Before
![image](https://user-images.githubusercontent.com/57058325/197403570-90fa17b0-d88c-41e6-bcb0-1220fa7890a9.png)
![image](https://user-images.githubusercontent.com/57058325/197403581-a8b92f42-0dbc-434e-81c5-5cf1b67eeb14.png)
After
The text was updated successfully, but these errors were encountered: