mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-14 18:49:02 +08:00
parent
08aa7e88bc
commit
4f3260d685
@ -8,6 +8,12 @@ export default class Link extends Mark {
|
||||
return 'link'
|
||||
}
|
||||
|
||||
get defaultOptions() {
|
||||
return {
|
||||
openOnClick: true,
|
||||
}
|
||||
}
|
||||
|
||||
get schema() {
|
||||
return {
|
||||
attrs: {
|
||||
@ -52,6 +58,10 @@ export default class Link extends Mark {
|
||||
}
|
||||
|
||||
get plugins() {
|
||||
if (!this.options.openOnClick) {
|
||||
return []
|
||||
}
|
||||
|
||||
return [
|
||||
new Plugin({
|
||||
props: {
|
||||
|
Loading…
Reference in New Issue
Block a user