diff --git a/src/extensions/RichText.js b/src/extensions/RichText.js index 2e714921ad8..d3bb572a6af 100644 --- a/src/extensions/RichText.js +++ b/src/extensions/RichText.js @@ -114,6 +114,12 @@ export default Extension.create({ suggestion: EmojiSuggestion(), }), LinkPicker, + Link.configure({ + ...this.options.link, + openOnClick: true, + validate: href => /^https?:\/\//.test(href), + relativePath: this.options.relativePath, + }), LinkBubble, this.options.editing ? Placeholder.configure({ @@ -124,14 +130,6 @@ export default Extension.create({ : null, TrailingNode, ] - if (this.options.link !== false) { - defaultExtensions.push(Link.configure({ - ...this.options.link, - openOnClick: true, - validate: href => /^https?:\/\//.test(href), - relativePath: this.options.relativePath, - })) - } const additionalExtensionNames = this.options.extensions.map(e => e.name) return [ ...defaultExtensions.filter(e => e && !additionalExtensionNames.includes(e.name)),