控件已支持全平台 Windows / macOS / Linux / ARM64 / MIPS64 / LoongArch64, 浏览器端首次使用需安装对应平台的客户端或扩展,各平台安装包与浏览器扩展统一在控件包页面提供; 装好后刷新本页即可截屏。
<link rel="stylesheet" href="/products/scppro/xheditor1x/xheditor-1.1.13/xheditor_skin/default/ui.css" />
<style>.zycapture{background:transparent url(/products/scppro/xheditor1x/zyCapture/scp.png) no-repeat;background-position:3px 2px}</style>
<script src="/res/jquery/jquery-1.9.1.min.js"></script>
<script src="/products/scppro/demo/zyCapture/json2.min.js"></script>
<script src="/products/scppro/demo/zyCapture/skygqbox.js"></script>
<script src="/products/scppro/demo/zyCapture/scp.js"></script> <!-- zyCapture 控件 --><!-- xhEditor 1.1.x 源码开头就读 $.browser.version,jQuery 1.9 起已移除该 API,
不补回来会在加载阶段直接抛异常、$.fn.xheditor 注册不上 -->
<script>
(function () {
if ($.browser) { return; }
var ua = navigator.userAgent.toLowerCase();
var m = ua.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/);
$.browser = {
version: m ? m[1] : "0",
safari: /webkit/.test(ua),
opera: /opera/.test(ua),
msie: /msie/.test(ua) && !/opera/.test(ua),
mozilla: /mozilla/.test(ua) && !/(compatible|webkit)/.test(ua)
};
$.browser.webkit = $.browser.safari;
})();
</script>
<script src="/products/scppro/xheditor1x/xheditor-1.1.13/xheditor-1.1.13-zh-cn.min.js"></script>
<textarea id="txtContent"></textarea>
<script>
var scpMgr = zyCapture.getInstance({
config: { PostUrl: "/api/upload", FileFieldName: "file" },
event: {
postComplete: function (url) {
editor.appendHTML('<img src="' + url + '" />');
}
}
});
// xhEditor 的插件声明:c=class 名, t=按钮 title, e=点击回调
var allPlugin = {
zycapture: { c: 'zycapture', t: '截屏', e: function () { scpMgr.Capture(); } }
};
var editor = $('#txtContent').xheditor({
plugins: allPlugin,
tools: 'zycapture,Source,Fullscreen,About'
});
</script>
POST /api/upload Request: multipart/form-data (字段名由 FileFieldName 指定,默认 file) Response: { "state": "SUCCESS", "url": "https://your-cdn.com/upload/2026/09/abc.png" // 图片地址,控件会回填到编辑器 } // 若返回格式无法用 url 字段表达,可用控件配置项做提取: // ImageMatch: "\"url\":\"(.+?)\"" 用正则从响应文本中取地址 // ImageUrl: "https://cdn.example.com/{url}" 在取到的地址前后拼路径
下载完整 DEMO 包与集成文档,或申请 1 周免费 POC 试用。