-
Notifications
You must be signed in to change notification settings - Fork 352
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
Remove proofState #503
Comments
Good point, I think this should be in docxtemplater core indeed. I will provide a patch over next week. |
Hello, this is now possible with docxtemplater 3.17.2, which I just released. This is however opt-in, it is not a default because depending on the usecase, some people only add firstnames/lastnames so they would not want to remove the proofstate, and also if you have already some grammar checker within your app, you don't want to rerun it on Word. Here is the doc about the remove-proofstate module : https://docxtemplater.readthedocs.io/en/latest/faq.html#remove-proofstate-tag |
In my view, it doesn't make sense to have this optional and certainly not default-off. It seems to me that there isn't any case where the resulting behaviour is useful. What happens is that the document displays no spelling errors when first opened, but as soon as the user makes any edits anywhere in the document, the spell check is re-run and the spelling errors popup. This is just confusing for users. There don't appear to be errors and suddenly they are there. Even if they are false positives, that's unhelpful. I could see it being useful in the case that someone is inserting names (which often fail spell checks) that you might disable the spell checker there. But proofState doesn't really disable the spell checker, there are other tags in the docx for that. At any rate, thanks for the library and implementing the feature! |
I will still have to think about it to change the default behavior, I have added it to the docxtemplater 4 roadmap at #340 I'm not sure yet whether this could be "harmful" for some users or not. What I think is that if some user doesn't want that feature (because he only adds first/names last/names for example), it could potentially have an impact (I guess word takes a bit more CPU if he needs to spell check on startup). |
I had a complaint from users that Word did not underline the spelling errors for documents generated by my program.
This is due to the presence of
<w:proofState w:grammar="clean" w:spelling="clean"/>
in word/settings.xml.
This tag is used by Word to indicate that the document was spell checked when last saved, so Word trust the w:proofErr elements that were serialized into the file. If this is removed, word will rerun spell check when it opens the document.
My thinking is that docxtemplater inserts who knows what text in the word document, it really ought to remove the proofState stage to indicate that the state of spelling/grammar correction is not longer "clean."
For my purposes, I've added a postprocessing operation that excises the tag in my application.
The text was updated successfully, but these errors were encountered: