generated from wandyezj/website-react
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
57 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
body { | ||
background-color: white; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<metadata> | ||
<title>Shared</title> | ||
</metadata> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js" type="text/javascript"></script> | ||
<link rel="stylesheet" type="text/css" href="./shared.css" /> | ||
</head> | ||
<body> | ||
<div> | ||
<h1>Shared</h1> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Shared runtime, will be used for snips that should run in the background. | ||
|
||
import { setupOffice } from "./core/setupOffice"; | ||
|
||
// Some rules for snips to run in the background | ||
// must | ||
// - only allow one to run in the background | ||
// - be embedded in the document | ||
// - only have default library references | ||
|
||
// Want a button to go back from currently loaded | ||
// Want a button to load a new one. | ||
|
||
async function setup() { | ||
await setupOffice(); | ||
|
||
// After the first time the add in is opened it will automatically load | ||
Office.addin.setStartupBehavior(Office.StartupBehavior.load); | ||
|
||
// redirect to edit and allow back | ||
window.location.href = "./run.html#back"; | ||
// back will act as reload in this case. | ||
} | ||
|
||
setup(); |