Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@gaoding/editor-sdk
Advanced tools
稿定编辑器 SDK
是对稿定能力的封装,以实现对设计服务的无缝对接,目前支持以下服务:
请先与我们联系(邮箱:bd@gaoding.com
),以便我们安排专人接待,为合作方预设一些关键数据,如: APPID
、模板类目ID
如合作方已经依本文档的定义实现了接口,我们需要合作方提供接入的域名信息,并记录到稿定的系统中,然后,由专人负责与合作方对接调试
npm i @gaoding/editor-sdk
# or
yarn add @gaoding/editor-sdk
import { GdEditorSdk } from '@gaoding/editor-sdk';
const sdk = new GdEditorSdk({
// 区分编辑器类型 (图片编辑器、平面编辑器、H5编辑器)
appId: '由SDK方提供',
// onUpload 执行后,是否自动关闭弹窗,默认为 true
autoClose: true;
// 完成编辑器下载时触发
onUpload(blob) {
// 直接展示
const url = window.URL.createObjectURL(blob);
const img = document.createElement('img');
img.src = url;
document.body.append(img);
// 上传的例子
const form = new FormData();
form.append('file', blob, 'gaoding.jpg');
axios.post('url', form, { headers: { 'Content-Type': 'multipart/form-data' } })
.then(res => {
alert('上传成功');
})
.catch(error => {
alert(error.message);
})
},
// 自定义iFrame样式
style: {}
})
// 打开弹窗
sdk.open({
ext: {
// 指定海报模板类目(图片、简历、GIF、LOGO、海报、表情头像、文章配图、适配封面。。。)
// ps: 使用场景为平面编辑器, 分类 ID 由 SDK方提供
third_cate_id: '',
// 指定编辑器底图
// ps: 使用场景为图片编辑器,需开放 CORS 跨域能力
image: 'https://st-gdx.dancf.com/materials/115030/shots/20190830-155521-WWU47.png'
}
});
// 关闭弹窗
sdk.close();
FAQs
稿定编辑器对外 SDK
The npm package @gaoding/editor-sdk receives a total of 1 weekly downloads. As such, @gaoding/editor-sdk popularity was classified as not popular.
We found that @gaoding/editor-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 15 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.