Comments (13)
有这个属性,不过暂时还没暴露出来,现在可以用下面的办法实现:
this.editorInstance.setEditorProp('disabled', true)
下一版本我把disabled属性暴露出来
from braft-editor.
另外,设置这个属性之后,控制按钮还是可用的,试试通过CSS隐藏控制栏吧。。。下一版本这一块需要统一处理一下了。。。。
from braft-editor.
谢谢了
from braft-editor.
本来想试试把所有的change事件都return false的
from braft-editor.
一个最简单的办法是你给编辑器容器设置CSS属性 pointer-events: none;
from braft-editor.
您好,您提供的方法不管用 this.refs.braftEditor.setEditorProp('disabled', true)
from braft-editor.
尴尬,记错了,是readOnly:
this.editorInstance.setEditorProp('readOnly', true)
from braft-editor.
还是不管用额。。。是我的版本问题么 我是1.1.14
from braft-editor.
脚本有报错么?看一下this.refs.braftEditor有没有setEditorProp这个方法
from braft-editor.
有是有,不过居然是 Cannot read property 'setEditorProp' of undefined....我的富文本编辑器明明已经渲染了。
难道要写到componentDidMount里?
from braft-editor.
恩,可能是时机问题,你也可以试试上面说的CSS属性 pointer-events: none;
<div className="editor-wrapper disabled"><BraftEditor /></div>
.editor-wrapper.disabled{
opacity: .7;
pointer-events: none;
}
这个也能有效,虽然不是那么严格。我明天发一个版本支持直接diasble吧
from braft-editor.
我试试吧 上方的小按钮 我直接传空数组了,这个我先用着,等明天的支持版,谢谢了
from braft-editor.
@ChinaBigPan 1.3.1已发布,新增了disabled属性,可以试试吼
from braft-editor.
Related Issues (20)
- fusion.design
- 404
- 作者回家生孩子去了?
- BraftEditor.use 实现自定义的行内组件 entnty ,entnty 在输出的 html 中 onClick 事件不执行 HOT 1
- 如何获取光标当前位置呢?
- createEditorState方法无法正确识别空白符 HOT 2
- 请问modal中设置了onConfirm函数,但是在页面上的按钮却默认是disabled应该怎么调整 HOT 2
- 自定义modal在cancel和confirm之后会被销毁,个人觉得把这个控制权作为一个字段给出会更好
- 富文本中内容被全选删除或无内容的时候继续删除会产生报错
- 全屏模式下有必要z-index:99999这么大嘛bro
- image toolbar上的操作会触发editor onChange
- 图片回显后无法显示,图片格式回显错误的解决方案
- 不再更新了吗?
- 请问如何通过某个api 在编辑器顶部或者底部插入自定义block
- 如何实现监听内容变化? HOT 2
- 多媒体上传视频格式能不能再扩展一些
- reopen: ctrl+x 剪切后会跳到顶部
- QQ群进不去了
- 添加网络资源,嵌入iframe,编辑初始化显示为空
- 能否更新react的版本,17.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from braft-editor.