nhn / toast-ui.vue-editor

This repository is DEPRECATED! GO TO 👉 https://github.com/nhn/tui.editor/tree/master/apps/vue-editor
MIT License
229 stars 47 forks source link

How can I change the link target to "_blank" in the viewer? #38

Open qkrtngus2085 opened 5 years ago

qkrtngus2085 commented 5 years ago

Version

1.1.1

Test Environment

Chrome, Mac

Current Behavior

The target of "a" tag in the TUI viewer is set to "_self".

<a href="">link</a>

Expected Behavior

I want to change the target of a tag in the viewer to "_blank". But I could not find a way.

<a href="" target="_blank">link</a>

The code solved the problem. https://nhn.github.io/tui.editor/api/latest/editor.js.html#line851 https://github.com/nhn/tui.editor/issues/288

options: {
    linkAttribute: {
        target: '_blank',
        contenteditable: 'false',
        rel: 'noopener noreferrer'
    }
}