liuhong1happy / react-umeditor Goto Github PK
View Code? Open in Web Editor NEWReact Editor like Umeditor
License: MIT License
React Editor like Umeditor
License: MIT License
后台已经返回了这样一组数据
{"data": {"image_src": "http://localhost:8080/statistics/1.jpg"}, "status": "success"}
前台就是不显示图片,图片的html显示undefined,查不到原因
很急,各位大神请指教
你好,接口上传图片的判断条件貌似太过写死...
能不能自定义实现 onSuccess 接口返回 images ?
如题
RT 报这个错误
// 需要外部引用MathQuill
var MQ = MathQuill ? MathQuill.getInterface(2) : null;
我尝试将编辑器用在这个项目上, 编辑器可以正常加载. 但是加载了编辑器页面后切换到其他页面, 点击鼠标会报warning. 初学react, 不是很懂如何解决
警告信息是
Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the EditorCore component.
最后两行是
handleRangeChange @ EditorCore.react.js:226
handleMouseUp @ EditorContentEditableDiv.react.js:109
如何设置编辑器的初始宽高啊?
类似UEditor的
initialFrameWidth
{Number} [默认值:1000] //初始化编辑器宽度,默认1000
initialFrameHeight
{Number} [默认值:320] //初始化编辑器高度,默认320
图片上传位置第一次是对的 第二次以后就不都不对了
菜单栏目前有诸如:链接:link,取消链接:unlink,全屏:fullscreen等等功能没有实现,请问后续会添加吗
当其他的input(type=text)和该编辑器在同一表单中,编辑其他的input会自发失去焦点,umeditor会自动获取焦点
rt
ctrl+A快捷键选中的内容,不能进行操作。
在项目中引入使用的的时候,npm install react-umeditor --save安装以后
<link rel="stylesheet" href="../../dist/third-part/mathquill/mathquill.css"/> <link rel="stylesheet" href="../../dist/react-umeditor.css" type="text/css" />
<script src="../../dist/third-part/jquery.min.js"></script> <script src="../../dist/third-part/mathquill/mathquill.js"></script>
这些都必须要重新引入一下么?
能集成在react-umeditor中么?
点击上传图片报错 this.argumentUploder is not a function,求解
最新版本0.4.1,支持七牛上传,允许两种上传策略:
具体示例,请参考:
如果还有更多疑问,请联系 [email protected]
fix #1
在node环境下没有NodeList和window这类对象, 在后端打包的时候会报错
输入文字之后,加入一个表情,之后添加一张图片,在之后加入表情或者图片都会在文章的最底部,无法移动,可以快捷键进行剪切移动。
使用0.4.1版本的七牛上传图片的plugins的时候,
第一张能上传成功,
然后继续上传第二张的时候,会上传失败,状态码返回614
在两个不同页面使用此组件,在两个页面间多次来回切换后,组件处于正在加载中
目前解决方案:
在父组件的componentDidMount
中设置编辑器的loaded
state 为 true
componentDidMount() {
this.editor.setState({
loaded: true,
});
}
// ES6 style
render() {
<Editor
ref={(editor) => {this.editor = editor}}
icons={icons}
plugins={plugins}
/>
}
项目中离不开这个功能。。。
{'data': {'image_src': xxx} , status:'success'},这是上传自己服务器的返回数据格式。
开发者并没有提到。加群也没人理我。
是我自己google出来的。
绝对是个坑,警示后人!
正常状况下(有内容),点击html,无法编辑html,输入无效(鼠标点击进入刚输入内容消失)(不知是否本身设计即此)
此时切换回正常输入,输入无效(鼠标点击进入刚输入内容消失)的情况依然保留
已于https://liuhong1happy.github.io/react-umeditor-example/#/demo/sample/base验证此问题的确存在
初始化函数应该是constructor(props)
好了,建议打包用css后撤不要用预编译less
qq群 247978846
按照项目的使用方法新建了一个组件进行测试,发现这三个功能没有效果还有字体颜色也是无法设置,请问这几个功能需要怎么设置才能使用呢?
我现在的需求是在编辑器里能上传图片,现在看react-umeditor的介绍里是使用plugins来告诉编辑器uploader,我现在用的是七牛服务器的上传服务,它需要一个上传token,我该在哪里传递这个参数?
还有就是在哪里处理上传完成的回调?
为应对更加丰富的内容编辑,特加入 “着重号” 功能。
已解决。
最近的bug会在这几天集中解决,如果有问题也请联系 [email protected]
或者加入qq群247978846
。
升级前,需要做的工作如下:
假设编辑器宽度是500,如果此时上传图片宽度是800,结果则会图片溢出编辑器的范围,造成显示错误
如题
希望能添加个参数控制选择图片的时候是单张还是多张。
目前看到的写得比较死板,不能扩展工具条的功能
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.