based on Embed a Word document in your blog , I know how can I embed a word document in an iframe in read-only mode . but I'm looking for a solution to open it in edit mode.
is there any way to open an office 365-word document in edit mode on an external website?
I tried to just put a sample document in an iframe but had no sucess.
update:
also I found this thread https://answers.microsoft.com/en-us/msoffice/forum/all/embed-o365-edit-link-in-an-iframe/ce46bc84-755a-4cf3-98ca-776ba143b671?page=2 but looks like it's too old and maybe since 2016 some method and solution has been developed to embed edit mode.
<iframe src="https://onedrive.live.com/edit.aspx?resid=5D099B6B963F20FB.118&ithint=file%2cdocx&wdOrigin=OFFICECOM-WEB.START.MRU"> </iframe>
console error:
Refused to display 'https://onedrive.live.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
The reason for this is, that the browser is sending an "X-Frame-Options: SAMEORIGIN" response header. This option prevents the browser from displaying iFrames that are not hosted on the same domain as the parent page.
See: Mozilla Developer Network - The X-Frame-Options response header
A solution will be to load it as an embed so Mircosoft will not redirect you a 1000 times. Mabye look at this: How do I render a Word document (.doc, .docx) in the browser using JavaScript?
If you do not want stay stucked in this trouble, have one way to resolve this, but this is very complexy/dificultly, following these steps:
I believe in this way like the best alternative to resolves this challenge.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.