Releases: pubpub/prosemirror-pandoc
Releases · pubpub/prosemirror-pandoc
v1.1.5
v1.1.4
v1.1.3
v1.1.2
v1.1.1
v1.1.0
fromProsemirror
/fromPandoc
configuration now takes an arbitrary resources
object, instead of an arbitrary resource
function. This turns out to be much more ergonomic when dealing with many different kinds of transformable resources.
Old usage:
// ruleset
rules.toProsemirrorNode("Image", (node, { resource }) => {
return {
type: "image",
attrs: {
url: resource(node.target.url),
},
};
});
// invocation
fromPandoc(ast, rules, { resource: imageTransformFn });
New usage:
// ruleset
rules.toProsemirrorNode("Image", (node, { resources }) => {
return {
type: "image",
attrs: {
url: resources.image(node.target.url),
},
};
});
// invocation
fromPandoc(ast, rules, { resources: { image: imageTransformFn } });
v1.0.0
0.7.0 Beta 0
pandoc-types
1.22 update