Skip to content

Commit

Permalink
Make AutoLink module follows linkTargetBlank option
Browse files Browse the repository at this point in the history
  • Loading branch information
lqez committed Nov 8, 2018
1 parent 32da732 commit a699edc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/js/base/module/AutoLink.js
Expand Up @@ -39,6 +39,9 @@ export default class AutoLink {
if (match && (match[1] || match[2])) {
const link = match[1] ? keyword : defaultScheme + keyword;
const node = $('<a />').html(keyword).attr('href', link)[0];
if (this.context.options.linkTargetBlank) {
$(node).attr('target', '_blank');
}

this.lastWordRange.insertNode(node);
this.lastWordRange = null;
Expand Down

0 comments on commit a699edc

Please sign in to comment.