处理文章的JS代码:
packJson = [{"end_cfi": ......}];//由Calibre导出
var text="";
for (var p in packJson) {
text += packJson[p].highlighted_text+"\n"
if (packJson[p].notes) {text += '<span class="notes">'+packJson[p].notes+'</span>\n'};
text += "\n"
}
console.log(text);
文章添加css如下:
<style>
.notes{
font-family: STZhongsong, serif;
}
.notes::before{
content: "批注:";
}
</style>
发表您的看法