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
npm i @gaoding/editor-sdk
# or
yarn add @gaoding/editor-sdk
import { GdEditorSdk } from '@gaoding/editor-sdk';
const sdk = new GdEditorSdk({
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);
})
}
})
sdk.open({ filter: 'xinmeiti' });
interface IConfig {
/**
*
* 编辑器下载,或选择预览图时触发
* @param {Blob} blob
* @returns {*}
* @memberof IConfig
*/
onUpload(blob: Blob): any;
/**
* 自定义iFrame样式
*
* @type {{[k: string]: string}}
* @memberof IConfig
*/
style?: {
[k: string]: string;
};
}
export declare class GdEditorSdk {
constructor(config: IConfig);
/**
* 打开iframe 弹窗
*
* @param {{ filter: string }} options
* @param options.filter 筛选项
* @memberof GdEditorSdk
*/
open(options: {
filter: string;
ext: {
[k: string]: string;
};
}): void;
/**
* 关闭弹窗
*
* @memberof GdEditorSdk
*/
close(): void;
}
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.