It would be nice to know how Google Docs overcomes this problem, they allow gui editing of .docx documents. Are they easier to interact with -- convert to and from HTML -- than wiki markup? There is also https://www.libreoffice.org/download/libreoffice-online/, perhaps it might be worth stealing some ideas or implementation from them