im using the Quill text editor which returns a Delta object representing the content.
/
i want to store this in a database but am unable to convert it to a string/json type format
deltaobject.toString
The above returns
[object object]
im using the Quill text editor which returns a Delta object representing the content.
https://quilljs./
i want to store this in a database but am unable to convert it to a string/json type format
deltaobject.toString
The above returns
[object object]
Share
Improve this question
asked Nov 1, 2017 at 12:50
PowerMan2015PowerMan2015
1,4185 gold badges22 silver badges48 bronze badges
1 Answer
Reset to default 8Use the native JSON converter...
var json = JSON.stringify(deltaobject);
then to convert it back to an object...
var obj = JSON.parse(json);
var json = JSON.stringify({ prop1: "Value1", property2: 123.456 });
console.log(json);
var obj = JSON.parse(json);
console.log(obj);
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744299066a4567406.html
评论列表(0条)