forked from nozer/quill-delta-to-html
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo-node.js
More file actions
33 lines (29 loc) · 661 Bytes
/
demo-node.js
File metadata and controls
33 lines (29 loc) · 661 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
var QuillDeltaToHtmlConverter = require("./dist/commonjs/main").QuillDeltaToHtmlConverter;
var ops = [{
insert: 'hello',
attributes: {
color: '#f00'
}
},
{
"insert": {
"customImageBlot": {
"height": 150,
"width": 150,
"url": "https://d35bklnb0uzdnn.cloudfront.net/image/i@Hy81U57G7.png"
}
},
attributes: {
renderAsBlock: true
}
},
{
insert: 'how r u?'
}
];
var converter = new QuillDeltaToHtmlConverter(ops);
converter.renderCustomWith((op, ctxop) => {
return 'aa';
})
var html = converter.convert();
console.log(html);