fix image form not displaying when added as first item in markdown widget
This commit is contained in:
parent
a1b947a23e
commit
8849953b50
@ -8,8 +8,8 @@ const image = {
|
|||||||
alt: match[1],
|
alt: match[1],
|
||||||
},
|
},
|
||||||
toBlock: data => `![${ data.alt || '' }](${ data.image || '' })`,
|
toBlock: data => `![${ data.alt || '' }](${ data.image || '' })`,
|
||||||
toPreview: (data, getAsset) => <img src={getAsset(data.image || '')} alt={data.alt || ''} />,
|
toPreview: (data, getAsset) => <img src={getAsset(data.image) || ''} alt={data.alt || ''} />,
|
||||||
pattern: /^!\[([^\]]+)]\(([^)]+)\)$/,
|
pattern: /^!\[(.*)\]\((.*)\)$/,
|
||||||
fields: [{
|
fields: [{
|
||||||
label: 'Image',
|
label: 'Image',
|
||||||
name: 'image',
|
name: 'image',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user