make link target _blank the default
This commit is contained in:
@@ -39,7 +39,7 @@ export default {
|
|||||||
],
|
],
|
||||||
content: `
|
content: `
|
||||||
<p>
|
<p>
|
||||||
Wow, this editor has support for links to the whole <a href="https://en.wikipedia.org/wiki/World_Wide_Web" target="_self">world wide web</a>. We tested a lot of URLs and I think you can add *every URL* you want. Isn’t that cool? Let’s try <a href="https://statamic.com/" target="_self">another one!</a> Yep, seems to work.
|
Wow, this editor has support for links to the whole <a href="https://en.wikipedia.org/wiki/World_Wide_Web">world wide web</a>. We tested a lot of URLs and I think you can add *every URL* you want. Isn’t that cool? Let’s try <a href="https://statamic.com/">another one!</a> Yep, seems to work.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
By default every link will get a \`rel="noopener noreferrer nofollow"\` attribute. It’s configurable though.
|
By default every link will get a \`rel="noopener noreferrer nofollow"\` attribute. It’s configurable though.
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ yarn add @tiptap/extension-link
|
|||||||
| class | string | – | Add a custom class to the rendered HTML tag. |
|
| class | string | – | Add a custom class to the rendered HTML tag. |
|
||||||
| openOnClick | boolean | true | If enabled, links will be opened on click. |
|
| openOnClick | boolean | true | If enabled, links will be opened on click. |
|
||||||
| rel | string | noopener noreferrer nofollow | Configure the `rel` attribute. |
|
| rel | string | noopener noreferrer nofollow | Configure the `rel` attribute. |
|
||||||
| target | string | _self | Set the default `target` of links. |
|
| target | string | _blank | Set the default `target` of links. |
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
| Command | Options | Description |
|
| Command | Options | Description |
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export default new Mark<LinkOptions>()
|
|||||||
.name('link')
|
.name('link')
|
||||||
.defaults({
|
.defaults({
|
||||||
openOnClick: true,
|
openOnClick: true,
|
||||||
target: '_self',
|
target: '_blank',
|
||||||
rel: 'noopener noreferrer nofollow',
|
rel: 'noopener noreferrer nofollow',
|
||||||
})
|
})
|
||||||
.schema(({ options }) => ({
|
.schema(({ options }) => ({
|
||||||
|
|||||||
Reference in New Issue
Block a user