{"id":18583182,"url":"https://github.com/gaoding-inc/gaoding-editor-doc","last_synced_at":"2026-03-19T05:10:19.659Z","repository":{"id":128931780,"uuid":"242044215","full_name":"gaoding-inc/gaoding-editor-doc","owner":"gaoding-inc","description":"稿定编辑器文档说明","archived":false,"fork":false,"pushed_at":"2020-09-18T02:07:56.000Z","size":17,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-15T09:40:36.115Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gaoding-inc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-21T03:18:27.000Z","updated_at":"2024-05-04T17:37:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"fd9b84e6-67e3-4e82-8149-6b8bfb19fd81","html_url":"https://github.com/gaoding-inc/gaoding-editor-doc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gaoding-inc/gaoding-editor-doc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaoding-inc%2Fgaoding-editor-doc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaoding-inc%2Fgaoding-editor-doc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaoding-inc%2Fgaoding-editor-doc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaoding-inc%2Fgaoding-editor-doc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gaoding-inc","download_url":"https://codeload.github.com/gaoding-inc/gaoding-editor-doc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaoding-inc%2Fgaoding-editor-doc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28987277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T18:17:03.387Z","status":"ssl_error","status_checked_at":"2026-02-01T18:16:57.287Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T00:20:53.902Z","updated_at":"2026-02-01T19:31:59.369Z","avatar_url":"https://github.com/gaoding-inc.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 稿定编辑器 SDK 接入说明\n稿定编辑器 SDK 是对稿定能力的封装，以实现对设计服务的无缝对接，目前支持以下服务：\n\n- [x] 平面编辑器\n- [x] 图片编辑器\n- [ ] TODO: H5编辑器\n- [ ] TODO: 打通用户登录, 请联系定制\n\nNPM 包参见：[@gaoding/editor-sdk](https://www.npmjs.com/package/@gaoding/editor-sdk)\n\n### 平面编辑器\n1. 海量创意模板快速生成\n1. 支持指定数十种主流模板场景类目 (https://gaoding.com/templates)\n\n\n### 图片编辑器\n- [x] 1. 图片剪裁功能\n- [x] 2. 图片增强、图片滤镜效果\n- [x] 3. 图片添加水印、添加相框、添加文字\n- [x] 4. 海量创意素材（文字、贴纸、边框、水印...）\n- [x] 5. 马赛克、涂鸦\n- [x] 6. 批量编辑\n\n##\n\n### 在接入前，要做什么？\n请先与我们联系（邮箱：`bd@gaoding.com`），\n**我们需要合作方提供企业以及接入域名等信息**，\n以便我们安排专人接待，为合作方预设一些关键数据，如： `APPID`、`模板类目ID`\n\n### 对接与调试\n如合作方已经依本文档的定义实现了接口，我们需要合作方提供接入的域名信息，并记录到稿定的系统中，然后，由专人负责与合作方对接调试\n\n### 安装\n```shell\nnpm i @gaoding/editor-sdk\n# or\nyarn add @gaoding/editor-sdk\n```\n\n### cdn 使用方式\n```html\n\u003cscript src=\"./jquery.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://cdn.dancf.com/editor-sdk@0.2.5/dist/gd-editor-sdk.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    var gdEditor = new GdEditorSdk({\n        // 区分编辑器类型 (图片编辑器、平面编辑器、H5编辑器)\n        appId: '由SDK方提供',\n        // onCompleted 执行后，是否自动关闭弹窗，默认为 true\n        autoClose: true,\n        // 完成按钮文案默认“完成”\n        buttonText: '完成',\n\n        // 0.2.4 版本以上支持\n        onCompleted: function (params) {\n            // 上传的例子\n            const form = new FormData();\n            form.append('file', params.blob, 'gaoding.jpg');\n\n            $.ajax({\n                url: 'url',\n                type: 'post',\n                contentType: 'multipart/form-data',\n                data: form,\n                success: function (res) {\n                    alert(\"ok\")\n                }\n            });\n        },\n\n        // 自定义iFrame样式\n        style: {}\n    });\n    gdEditor.open({\n        ext: {\n            third_cate_id: 356\n        }\n    });\n\u003c/script\u003e\n```\n### npm 使用方式\n```javascript\nimport { GdEditorSdk } from '@gaoding/editor-sdk';\n\nconst gdEditorSDK = new GdEditorSdk({\n    // 区分编辑器类型 (图片编辑器、平面编辑器、H5编辑器)\n    appId: '由SDK方提供',\n    // onCompleted 执行后，是否自动关闭弹窗，默认为 true\n    autoClose: true,\n    // 完成按钮文案默认“完成”\n    buttonText: '完成',\n    \n    // 完成编辑器下载时触发\n    onCompleted({ blob, workId, sourceId }) {\n        // 直接展示\n        const url = window.URL.createObjectURL(blob);\n        const img = document.createElement('img');\n        img.src = url;\n        document.body.append(img);\n\n        // 上传的例子\n        const form = new FormData();\n        form.append('file', blob, 'gaoding.jpg');\n        axios.post('url', form, { headers: { 'Content-Type': 'multipart/form-data' } })\n            .then(res =\u003e {\n                alert('上传成功');\n            })\n            .catch(error =\u003e {\n                alert(error.message);\n            })\n    },\n    // 自定义iFrame样式\n    style: {}\n});\n\n// 打开弹窗\ngdEditorSDK.open({\n    ext: {\n        // 指定海报模板类目(图片、简历、GIF、LOGO、海报、表情头像、文章配图、适配封面。。。)\n        // ps: 使用场景为平面编辑器, 分类 ID 由 SDK方提供\n        // third_cate_id: '',\n        // 指定编辑器底图\n        // ps: 使用场景为图片编辑器，需开启 CORS 跨域访问，稿定域名为 *.gaoding.com\n        url: 'https://st-gdx.dancf.com/materials/115030/shots/20190830-155521-WWU47.png'\n    }\n});\n// 关闭弹窗\ngdEditorSDK.close();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaoding-inc%2Fgaoding-editor-doc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgaoding-inc%2Fgaoding-editor-doc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaoding-inc%2Fgaoding-editor-doc/lists"}