![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
zan-richtext
Advanced tools
基于 UEditor 的 React 富文件编辑器
:::demo 基础用法
import RichText from 'zan-richtext';
class Simple extends React.Component {
state = {
value: 'cafe babe'
}
componentWillMount() {
setTimeout(() => {
this.richTextEditor.editor.setContent('form ajax.');
}, 5000);
}
onChange = (data) => {
this.setState({
value: data
});
}
render() {
return (
<div>
<RichText
ref={el => this.richTextEditor = el}
value={this.state.value}
onChange={this.onChange}
editorConfig={{
initialFrameWidth: 500
}}
uploadConfig={{
materials: false
}}
/>
<div style={{ marginTop: '20px' }}>
<p>结果:</p>
<div>{this.state.value}</div>
</div>
</div>
);
}
}
ReactDOM.render(
<Simple />
, mountNode
);
:::
非受控组件
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
className | 自定义额外类名 | string | '' |
value | 富文本的值 | string | '' |
onChange | 内容变化时的回调 | func | noop |
ueditorUrl | ueditor.all.js 的cdn路径 | string | '//b.yzcdn.cn/v2/vendor/ueditor/release/ueditor.all.min.201705122045.js' |
ueditorConfigUrl | ueditor.config.js 的cdn路径 | string | '//b.yzcdn.cn/v2/vendor/ueditor/release/ueditor.config.201705122045.js' |
qiniuCdnUrl | 七牛 cdn 域名 | string | 'https://img.yzcdn.cn' |
ueditorHomeUrl | ueditor 资源文件 cdn 路径 | string | '//b.yzcdn.cn/v2/vendor/ueditor/dist/' |
ueditorIframeUrl | ueditor iframe cdn 路径 | string | '//www.youzan.com/v2/static/vendor/ueditor/dist/' |
editorConfig | ueditor 的自定义配置 | object | {} |
uploadConfig | upload 组件的自定义配置 | object | {} |
uploadImageRule | 七牛图片规则 | string | '!730x0.jpg' |
FAQs
基于 UEditor 的 React 富文件编辑器
The npm package zan-richtext receives a total of 2 weekly downloads. As such, zan-richtext popularity was classified as not popular.
We found that zan-richtext demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.