Skip to content

Commit

Permalink
fix: Work around issue where numeric value is passed to prosemirror-m…
Browse files Browse the repository at this point in the history
…arkdown

Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr authored and mejo- committed Feb 1, 2023
1 parent 9f6d668 commit 54e29cc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/nodes/Image.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const Image = TiptapImage.extend({

/* Serializes an image node as a block image, so it ensures an image is always a block by itself */
toMarkdown(state, node, parent, index) {
node.attrs.alt = node.attrs.alt.toString()
defaultMarkdownSerializer.nodes.image(state, node, parent, index)
state.closeBlock(node)
},
Expand Down

0 comments on commit 54e29cc

Please sign in to comment.