问题
The Word desktop app allows to hide/display the text by togggling 'Hidden' property in Font properties.
The same can be achieved by setting <w:vanish />
property using binding.setDataAsync(data, Office.coercionType.OOXML)
which sets data
to a binding. It works in Word desktop app but doesn't work in Word Online. The XML can be found here.
I tried setting data as html and use display: none;
as style to the root element and that's not working.
Are there any other ways to hide text with Office.js that works in both Word desktop app and Word Online?
来源:https://stackoverflow.com/questions/52312862/how-to-hide-content-of-binding-using-office-js