display images inserted through rte

This commit is contained in:
Shawn Erquhart
2017-07-27 13:11:54 -04:00
parent 336cab2592
commit 1f961d36cf
3 changed files with 6 additions and 6 deletions

View File

@ -37,7 +37,7 @@ const buildtInPlugins = [{
alt: match[1],
},
toBlock: data => `![${ data.alt }](${ data.image })`,
toPreview: data => <img src={data.image} alt={data.alt} />,
toPreview: (data, getAsset) => <img src={getAsset(data.image)} alt={data.alt} />,
pattern: /^!\[([^\]]+)]\(([^)]+)\)$/,
fields: [{
label: 'Image',