make link target _blank the default

This commit is contained in:
Hans Pagel
2020-09-27 10:41:20 +02:00
parent 13c95b602e
commit 30bf37c8c8
3 changed files with 3 additions and 3 deletions

View File

@@ -39,7 +39,7 @@ export default {
],
content: `
<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. Isnt that cool? Lets 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. Isnt that cool? Lets try <a href="https://statamic.com/">another one!</a> Yep, seems to work.
</p>
<p>
By default every link will get a \`rel="noopener noreferrer nofollow"\` attribute. Its configurable though.

View File

@@ -20,7 +20,7 @@ yarn add @tiptap/extension-link
| class | string | | Add a custom class to the rendered HTML tag. |
| openOnClick | boolean | true | If enabled, links will be opened on click. |
| 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
| Command | Options | Description |

View File

@@ -23,7 +23,7 @@ export default new Mark<LinkOptions>()
.name('link')
.defaults({
openOnClick: true,
target: '_self',
target: '_blank',
rel: 'noopener noreferrer nofollow',
})
.schema(({ options }) => ({