Open bcz3 opened 1 week ago
Sorry, but I do not maintain this lib for a long time...
I suggest you to combine those libraries to do the same functionality:
{
rewrite: (node, index, parent) => {
if(node.tagName == "img") {
parent.children = [...parent.children, {
type: 'element',
tagName: "figcaption",
// Optional
properties: {
class: "text-xs"
},
children: [
{
type: "element",
tagName: "small",
children: [
{type: 'text', value: node.properties.alt}
]
}
]
}]
}
}
}
{
selector: 'img',
wrapper: 'figure data-img .text-center'
}
I just tested it and doesn't work