fix custom link attribute
This commit is contained in:
parent
05e4f87707
commit
9372c19b00
1 changed files with 4 additions and 1 deletions
|
@ -8,7 +8,10 @@ const locateMention = (value, fromIndex) => value.indexOf('@', fromIndex);
|
|||
const createURI = (text, uri, autoEmbed = false) => ({
|
||||
type: 'link',
|
||||
url: (uri.startsWith(protocol) ? '' : protocol) + uri,
|
||||
data: { hProperties: { dataPreview: autoEmbed } },
|
||||
data: {
|
||||
// Custom attribute
|
||||
hProperties: { 'data-preview': autoEmbed },
|
||||
},
|
||||
children: [{ type: 'text', value: text }],
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue