add option to disable open links on click, fix #479, see #449

This commit is contained in:
Philipp Kühn
2019-10-04 14:24:34 +02:00
parent 08aa7e88bc
commit 4f3260d685

View File

@@ -8,6 +8,12 @@ export default class Link extends Mark {
return 'link' return 'link'
} }
get defaultOptions() {
return {
openOnClick: true,
}
}
get schema() { get schema() {
return { return {
attrs: { attrs: {
@@ -52,6 +58,10 @@ export default class Link extends Mark {
} }
get plugins() { get plugins() {
if (!this.options.openOnClick) {
return []
}
return [ return [
new Plugin({ new Plugin({
props: { props: {