Skip to content

Commit f1bd95f

Browse files
committed
fix(tiptap-link): call parent::addOptions() to prevent 'Undefined array key isAllowedUri'
1 parent fd468a7 commit f1bd95f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

resources/js/plugin.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ let coreExtensions = {
8686
italic: [Italic],
8787
lead: [Lead],
8888
link: [CustomLink.configure({
89-
isAllowedUri: (url, ctx) => ctx.defaultValidate(url) && !url.startsWith('./'),
9089
openOnClick: false,
9190
autolink: false,
9291
HTMLAttributes: {

src/Extensions/Marks/Link.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ class Link extends BaseLink
88
{
99
public function addOptions(): array
1010
{
11-
return [
11+
return array_merge(parent::addOptions(), [
1212
'openOnClick' => true,
1313
'linkOnPaste' => true,
1414
'autoLink' => true,
1515
'protocols' => [],
1616
'HTMLAttributes' => [],
1717
'validate' => 'undefined',
18-
];
18+
]);
1919
}
2020

2121
public function addAttributes(): array

0 commit comments

Comments
 (0)