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

wangeditor-upload-video-support

v1.0.6

Published

支持视频上传的wangeditor

Downloads

3

Readme

wangEditor

build badge

轻量级 web 富文本编辑器,配置方便,使用简单。

当前是 v4 版本。想继续使用 v3 版本看这里

浏览器兼容性

兼容常见的 PC 浏览器:Chrome,Firefox,Safar,Edge,QQ 浏览器,IE11 。

不支持移动端。

基本使用

npm 安装 npm i wangeditor-upload-video-support --save ,几行代码即可创建一个编辑器

import E from "wangeditor-upload-video-support";
const editor = new E('#div1')
// editor.config.uploadVideoServer = '/api/upload-video'
// editor.config.showLinkVideo = false
// editor.config.linkVideoCallback = function (url) {
//     console.log('linkVideoCallback', url)
// }
// editor.config.uploadVideoMaxSize = 10 * 1024 // 10kb
// editor.config.customAlert = function (s) {
//     console.log('customAlert: ' + s)
// }
// editor.config.uploadVideoMaxLength = 2
// editor.config.uploadVideoName = 'my-file-name'
// editor.config.uploadVideoParams = {
//     x: 100,
//     y: 'abc'
// }
// editor.config.uploadVideoParamsWithUrl = true
// editor.config.uploadVideoHeaders = {
//     a: 100,
//     b: 'xyz'
// }
// editor.config.uploadVideoTimeout = 5 * 1000
// editor.config.uploadVideoHooks = {
//     before: function (xhr) {
//         console.log(xhr)
//         // return {
//         //     prevent: true,
//         //     msg: '阻拦 xhr 发送'
//         // }
//     },
//     success: function (xhr) {
//         console.log('success', xhr)
//     },
//     fail: function (xhr, editor, resData) {
//         console.log('fail', resData)
//     },
//     error: function (xhr, editor, resData) {
//         console.log('error', xhr, resData)
//     },
//     timeout: function (xhr) {
//         console.log('timeout')
//     },
//     customInsert: function (insertVideoFn, result) {
//         console.log('customInsert', result)
//         insertVideoFn(result.data[0]) // 只插入一个视频,多了忽略
//     }
// }
// editor.config.customUploadVideo = function (resultFiles, insertVideoFn) {
//     console.log('customUploadVideo', resultFiles)
// }
editor.create()

更多使用方法,可参考文档

交流

加入 QQ 群

  • 164999061(人已满)
  • 710646022(人已满)
  • 901247714

提交 bug 或建议

开发团队

有专业开发团队维护,非个人单兵作战。

想加入 wangEditor 研发团队,可申请加入 QQ 群,然后私聊群主。

开发文档

开发文档,供申请加入开发团队,或者对源码感兴趣的用户阅读。

加入开发团队后,还会有更详细的开发流程、规划、沟通机制。内容太多,这里不公开。

为我们加油

你的支持,将激励我们输出更多优质内容!