我正在尝试将 EditorJs 输出转换为 Html。EditorJs 输出“干净”的数据,如下所示:
{
"time": 1589987527499,
"blocks": [
{
"type": "embded",
"data": {
"service": "youtube",
"source": "https://www.youtube.com/watch?v=JbqGYgI3XY0",
"embed": "https://www.youtube.com/embed/JbqGYgI3XY0",
"width": 580,
"height": 320,
"caption": ""
}
},
{
"type": "image",
"data": {
"file": {
"url": "http://localhost/uploads/images/1.jpg"
},
"caption": "",
"withBorder": false,
"stretched": false,
"withBackground": false
}
},
{
"type": "header",
"data": {
"text": "test",
"level": 2
}
}
],
"version": "2.17.0"
}
如何将其转换为原始 HTML?我必须手动转换吗?