admin管理员组文章数量:1279049
I am using React Quill to set my data. on some button clicks I am add json data in the editor of the quill. and the object which I add looks like this.
{
"key1": 1,
"key2": 2,
"spobj1":{ "tm_id1": 1234, "tm_id2": 1235},
"spobj2":{ "tm_id1": 222, "tm_id2": 333},
"key3": 1,
"metadata": {
"debug":{ "tm_id1": 1234, "tm_id2": 1235}
"json":{ "tm_id1": 222, "tm_id2": 333},
}}
and my component is
<ReactQuill
key={1}
ref={stdQuillRef}
theme="bubble"
onChange={(html) => handleQuillChange(html, type.FieldGroup)}
value={stdText || ""}
modules={{ toolbar: { container: [], handlers: {} } }}/>
When I add spobj1 or spobj2 to the content, I need to create a metadata object at the end as shown above.
When this object is in the editor, I want to hide the metadata object from the UI but keep it as part of the original JSON that I will save in the database.
Is there a way to achieve this? How can I set some part of the string hidden in the editor.
本文标签: reactjsHow to add hidden contents in ReactQuill EditorStack Overflow
版权声明:本文标题:reactjs - How to add hidden contents in ReactQuill Editor - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741286389a2370293.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论