快速开始

... 2023-5-22 小于 1 分钟

# 快速开始

# 步骤 1: 引用在线预览 SDK

在线预览 SDK 地址:

https://cdn.addon.tencentsuite.com/lib/web-sdk/global.js
1
1

目前我们提供了 UMD 模块化规范的包,可以按以下的例子进行引入:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport"
            content="width=device-width, initial-scale=1.0, user-scalable=no, minimal-ui, viewport-fit=cover" />
        <title>WebOffice Demo</title>
        <style>
            html * {
                box-sizing: border-box;
                scrollbar-width: none;
                -ms-overflow-style: none;
            }
    
            ::-webkit-scrollbar {
                display: none;
            }
        </style>
    </head>
    <body style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; margin: 0;">
        <script src="https://cdn.addon.tencentsuite.com/lib/web-sdk/global.js"></script>
         <script>
          console.log('成功引入在线预览 SDK!', TencentDocsSDK)
        </script>
    </body>
</html>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

# 步骤 2: 初始化在线预览 SDK

上一步成功引入 SDK 后,参照初始化配置项完成初始化

上次编辑于: 2023年7月31日 14:44
贡献者: daleshen , gavinbyang