How to let office online own the style of view mode?
Asked Answered
S

2

0

Recently, I would like to use the “edit mode” of Office Online Server to open the Microsoft Word file as follows:

http://office-online/we/wordeditorframe.aspx?WOPISrc=...&access_token=...

However, I notice that there is no gap between two consecutive pages, please see the following screenshot.

enter image description here

In addition, when I use the “view mode” to view a word document with wordviewframe.aspx, the presentation of page is normal.

http://officeonline/wv/wordviewerframe.aspx?WOPISrc=...&access_token=...

enter image description here

But this time I discover that the Edit in Browser button(in the top right-hand corner)cannot be used.

I have added the attributes such as

HostEditUrl, EditModePostMessage in CheckFileInfo described in official document.

enter image description here

enter image description here

So I have two questions:

1) How to let “edit mode” own the style of “view model”? Namely, there is some space between two word page.

2) How to switch to edit-mode from view mode?

Thanks very much.

Sr answered 5/3, 2020 at 7:26 Comment(2)
What do you mean by "cannot be used"? Is the link disabled? Does it lead to a dead URL?Watford
@Watford Yes, “cannot use” means the button is disabled.Sr
W
1

1) This might actually be a bug in the OOS. Can you verify that the problem persists when you switch the <ui=UI_LLCC&><rs=DC_LLCC&> to English locale & open a document written in English? Just to rule out this possibility.

2) The HostViewUrl and HostEditUrl is supposed to lead to a "host page" - an HTML page which will host an iframe that points to an Office for the web application. => Not to the OOS URL directly.

Watford answered 12/3, 2020 at 20:3 Comment(0)
P
2

Your WOPI host (your own API which implemented WOPI Protocol) must,

  1. Implement methods PutFile (to save updated file on your storage) and PutRelativeFile (to create a new file based on the current file, for example converting from .doc to be .docx).

  2. Return following data in the response of CheckFileInfo operation.
    2.1 SupportUpdate : true (to let WOPI Client know that your API implement the PutFile and PutRelativeFile methods)
    2.2 UserCanWrite : true (to indicate that the use have Write permission over the file)
    2.3 LicenseCheckForEditIsEnabled : true (to route user to Microsoft Login page to verify that the user have Office 365 license)
    2.4 HostEditUrl : url_to_your_edit_page

NOTE: Your user need MS Office 365 license in order to edit file on WOPI.
Valid XHTML.

Petrapetracca answered 31/3, 2020 at 9:11 Comment(0)
W
1

1) This might actually be a bug in the OOS. Can you verify that the problem persists when you switch the <ui=UI_LLCC&><rs=DC_LLCC&> to English locale & open a document written in English? Just to rule out this possibility.

2) The HostViewUrl and HostEditUrl is supposed to lead to a "host page" - an HTML page which will host an iframe that points to an Office for the web application. => Not to the OOS URL directly.

Watford answered 12/3, 2020 at 20:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.