Allow Links to use their individual attrs.target (#902)

* Allow Links to use their personal target attr

* fix irregular whitespace
This commit is contained in:
Daniel Bakan 2020-12-29 10:12:02 +01:00 committed by GitHub
parent b8f4dcde72
commit f1fbee9da7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,7 @@ export default class Link extends Mark {
toDOM: node => ['a', {
...node.attrs,
rel: 'noopener noreferrer nofollow',
target: this.options.target,
target: node.attrs.target || this.options.target,
}, 0],
}
}