![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
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 4 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.