generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix the xlsx View & make the plugin desktoponly (#55)
* fix: fix the xlsx View & make the plugin desktoponly * feat: add the xls & xlsm type
- Loading branch information
1 parent
3f26159
commit 4d65d89
Showing
7 changed files
with
38 additions
and
50 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,21 @@ | ||
import exec from '@univerjs-pro/exchange-wasm/wasm_exec?raw' | ||
import init from '@univerjs-pro/exchange-wasm/exchange.wasm?init' | ||
|
||
export async function injectWasm() { | ||
try { | ||
// eslint-disable-next-line no-new-func | ||
new Function(exec)() | ||
|
||
// @ts-expect-error | ||
const go = new window.Go() | ||
|
||
init(go.importObject).then((instance) => { | ||
go.run(instance) | ||
}).catch((err) => { | ||
console.error(err) | ||
}) | ||
} | ||
catch (err) { | ||
console.error(err) | ||
} | ||
} |
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