diff options
Diffstat (limited to 'app/assets/javascripts/content_editor/extensions/link.js')
-rw-r--r-- | app/assets/javascripts/content_editor/extensions/link.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/assets/javascripts/content_editor/extensions/link.js b/app/assets/javascripts/content_editor/extensions/link.js index 27bc05dce6f..f9b12f631fe 100644 --- a/app/assets/javascripts/content_editor/extensions/link.js +++ b/app/assets/javascripts/content_editor/extensions/link.js @@ -18,10 +18,13 @@ export const extractHrefFromMarkdownLink = (match) => { }; export default Link.extend({ - defaultOptions: { - ...Link.options, - openOnClick: false, + addOptions() { + return { + ...this.parent?.(), + openOnClick: false, + }; }, + addInputRules() { const markdownLinkSyntaxInputRuleRegExp = /(?:^|\s)\[([\w|\s|-]+)\]\((?<href>.+?)\)$/gm; const urlSyntaxRegExp = /(?:^|\s)(?<href>(?:https?:\/\/|www\.)[\S]+)(?:\s|\n)$/gim; |