Open phuongthuan opened 4 years ago
Here we can convert ul to ol tag, but how we can add some styles for the tag that we converted.
function transform(node, index) { // convert <ul> to <ol> if (node.type === 'tag' && node.name === 'ul') { node.name = 'ol'; return convertNodeToElement(node, index, transform); } }
Hi bro, i just found a solution that resolved problem. Just add a property style in attribs node.attribs.style = 'color: red';
node.attribs.style = 'color: red';
Here we can convert ul to ol tag, but how we can add some styles for the tag that we converted.