我在和SlateJS v0.34.5一起玩。有任何方式来切换编辑器只读状态吗?
v0.34.5
发布于 2018-12-24 07:37:28
我已经搞清楚了。我真傻。将readOnly属性添加到state中,然后在Editor中传递它,如下所示
readOnly
state
Editor
<Editor readonly={this.state.readOnly} />
然后做常规的setState的东西来切换它。
setState
https://stackoverflow.com/questions/53904634
相似问题