[英]Trumbowyg React input data typed reverse order
I'm now integrating Trumbowyg editor into react project.我现在正在将 Trumbowyg 编辑器集成到反应项目中。
const [content, setContent] = useState();
return (
<Trumbowyg
onChange={e => setContent(e.target.innerHTML)}
data={content}
/>
)
But for every keypress event, the cursor moves to the start position, so the content becomes reversed但是对于每个按键事件,光标都会移动到开始位置,因此内容会反转
I typed "start", but they are in reversed order, you see.我输入了“开始”,但它们的顺序相反,你看。
You dont need to pass content
to Trumbowyg
, just remove it您不需要将
content
传递给Trumbowyg
,只需将其删除
<Trumbowyg
onChange={e => setContent(e.target.innerHTML)}
/>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.