I'm creating an outlook add-in and use the OfficeJS API in React app. In there I want to load a specific set of features for the compose mode and another set of features for the read mode. So my question is, how to see in which mode I'm currently on?
I usually check for APIs to know the mode, if you don't want to create two separate landing pages for read and compose modes.
You can check for displayReplyForm API, this is a read mode API, so if this is undefined then you are in compose mode.
if (Office.context.mailbox.item.displayReplyForm != undefined) {
// read mode
} else {
// compose mode
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With