Skip to content

Commit

Permalink
update markdown image component config
Browse files Browse the repository at this point in the history
  • Loading branch information
erquhart committed Dec 21, 2017
1 parent 61f2a10 commit df63859
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/MarkdownPlugins/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const image = {
image: match[2],
alt: match[1],
},
toBlock: data => `![${ data.alt }](${ data.image || '' })`,
toPreview: (data, getAsset) => <img src={getAsset(data.image || '')} alt={data.alt || ''} />,
pattern: /^!\[([\S\s]*)\]\(([\S\s]*)\)$/,
toBlock: data => `![${ data.alt || '' }](${ data.image || '' })`,
toPreview: (data, getAsset) => <img src={getAsset(data.image) || ''} alt={data.alt || ''} />,
pattern: /^!\[([\S\s]*)\]\((.*)\)$/,
fields: [{
label: 'Image',
name: 'image',
Expand Down

0 comments on commit df63859

Please sign in to comment.