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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@faru/tinymce

v1.0.47

Published

富文本编辑器

Downloads

61

Readme

@faru/tinymce

浙江法援项目 文章富文本编辑器

因文件上传到阿里云oss的私有云,后端返回的oss文件有时效性,一个小时之后会过期,需要通过文件的objectKey去oss去最近的文件地址

浙江法援项目中的react版本为15.x, 最新的tinymce只支持react16.x,故该组件中的react和tinymce版本都为低版本。不支持最新版本。

富文本编辑器中的图片上传之后,img中存储的为oss文件地址,当oss文件有效期之后,图片不能正常访问(403)

组件用正则匹配所有的img标签,之后继续匹配img的src属性,根据getPolicy接口拿到oss的priBucketName和endPoint属性

根据oss的priBucketName和endPoint。字符串替换可以得到图片的objectKey。

Image 对象可以判断src时候存在也有有效,来判断是否需要去获取最新的oss图片地址

通过getUrl方法,传objectKey得到最新的oss图片地址。重新渲染。

该组件不可扩展,只兼容浙江法援项目的富文本。

若其他的项目需要该组件,不可直接使用。