react ant-design 使用ueditor
来源:互联网 发布:java常用包介绍 编辑:程序博客网 时间:2024/06/05 06:03
1.页面引入
<script type="text/javascript" src="http://localhost:8080/HBBKCOM/content/chajian/ueditor/editor_config.js"></script>
<script type="text/javascript" src="http://localhost:8080/HBBKCOM/content/chajian/ueditor/editor_api.js"></script>
2.页面引入了js 但是UE变量不能直接使用 可以写段js来绑定一下 如
<script type="text/javascript">
Date.prototype.UE=UE ;
</script>
3.自定义控件ueditor.js
import React,{ Component } from 'react';
class Ueditor extends Component {
componentDidMount(){
var UE=new Date().UE;
try{UE.getEditor(this.props.id).destroy();}catch(err){}//再次初始化有问题 要销毁原来的
var editor = UE.getEditor(this.props.id, {
lang:"zh-cn" ,initialFrameHeight: this.props.height , initialFrameWidth: '100%'
});
var me = this;
editor.ready( function( ueditor ) {
var value = me.props.value?me.props.value:'<p></p>';
editor.setContent(value);
});
}
render(){
return (
<div id={this.props.id}></div>
)
}
}
export default Ueditor;
使用
<Ueditor value="" id="content" height="200" />
- react ant-design 使用ueditor
- React--ant design
- dva+react+ant.design
- react入门篇 ant-design
- 【开发】Cordova+Ant Design+React教程
- react-native 结合ant-Design- mobile
- react开发笔记 —ant-design框架
- Ant Design of React—概要
- Ant Design of React—第一节
- Ant Design of React—第二节
- Ant Design of React—第三节
- Ant Design of React—第四节
- Ant Design of React—第五节
- Ant Design of React—第六节
- Ant Design of React—第七节
- Ant Design of React—第八节
- 基于React.js + ANT DESIGN 中使用异步请求之----fetch封装
- GitHub Ant-Design/ant-init 使用示例
- Jmeter操作常见问题积累
- javaday52_IO流_打印流PrintStream和序列流SequenceInputStream
- CF Round 418爆零记
- 数字黑洞JAVA
- BSOI_2261.作弊的发牌者 (cheat.pas/c/cpp)
- react ant-design 使用ueditor
- Windows下静态库和动态库的制作
- NSOJ Thepartialsumproblem
- Piggy-Bank (hdu 1114 完全背包 模板)
- 2017.5.14入门组总结
- c++异常处理
- 笨小猴
- MySQL 修改索引名称
- Struts1框架九之声明式异常