npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ali-ckeditor-upload

v1.0.1

Published

aliyun oss upload image ckeditor plugin

Downloads

5

Readme

CKEditor 阿里云上传适配器插件

  1. 您需要创建CKEditor的自定义版本。
  2. 将此插件注册到您的自定义版本中

1.创建自己的CKEditor

有关更多详细信息,请查看此官方教程

git clone -b stable https://github.com/ckeditor/ckeditor5-build-classic.git
cd ckeditor5-build-classic
yarn install

或者使用官方在线定制

在安装此插件之前,您可以使用默认设置测试自己的版本。

yarn build

构建完成后,您将在build文件夹中获得一个自定义CKEditor 。

打开sample/index.html查看效果

2.安装此插件

在您的自定义CKEditor构建中,将此插件安装在程序包管理器中。

yarn add ali-ckeditor-upload
or
npm install ali-ckeditor-upload

修改node_modules\ali-ckeditor-upload\index.js,输入阿里云OSS的相关信息,参考文档

const config = {
	// region以杭州为例(oss-cn-hangzhou),其他region按实际情况填写。
    region: '<Your region>',
    accessKeyId: '<Your AccessKeyId>',
    accessKeySecret: '<Your AccessKeySecret>',
 	bucket: 'Your bucket name'
    // 您保存的在OSS的文件路径
	savePath: "images/",
};

转到src/ckeditor.js,进行以下更改以加载此插件。

+import AliUploadAdapter from "ali-ckeditor-upload";

export default class ClassicEditor extends ClassicEditorBase {}

// Plugins to include in the build.
ClassicEditor.builtinPlugins = [
	...,
+	AliUploadAdapter
];

// Editor configuration.
ClassicEditor.defaultConfig = {...};

如果您在中进行任何更改src/ckeditor.js,则必须重新构建。

yarn build

故障排除

ckeditor复制模块

  1. 请确保您的自定义CKEditor 5构建依赖项版本 >= 19.0.0

  2. 更新/检查依赖关系后,尝试为您创建一个干净的CKEditor 5

    	rm -rf node_modules && yarn install 
    	yarn build
  3. 使用npm ls,搜索@ckeditor以查看是否存在重复的模块

  4. 如果问题仍然存在,请阅读官方文档