After seeing your request, our team has decided to improve the way this operation can be done in viewer 3, as it is not very straightforward currently. We will get back to you with a code example once that is done.
Hello,
with Viewer 3 version 1.11.7 you can now update the contents rather easily.
Here is a CodeSandBox to demonstrate this.
Hope this helps.
Cheers, Michael