nhn / tui.editor

🍞📝 Markdown WYSIWYG Editor. GFM Standard + Chart & UML Extensible.
http://ui.toast.com/tui-editor
MIT License
17.16k stars 1.75k forks source link

linkAttribute in Viewer #527

Open sohee-lee7 opened 5 years ago

sohee-lee7 commented 5 years ago

Version

v1.4.0

Test Environment

Chrome

Current Behavior

linkAttribute does not work in Viewer.

Expected Behavior

Viewer need linkAttribute.

BrianMaldo commented 4 years ago

Has this been implemented yet? I'm using the code below and all my href are still opening in the current window.

var editor = new $window.tui.Editor.factory({
    el: document.querySelector('#editSection'),
    height: '100%',
    viewer: true,
    initialValue: content,
    linkAttribute: {
        target: '_blank',
        contenteditable: 'false',
        rel: 'noopener noreferrer'
    },
    exts: ['table']
});
Ben-Mack commented 3 years ago

I can confirm it's been working on the newest release 2.5.1

albertpak commented 3 years ago
inkAttribute: {
        target: '_blank',
        contenteditable: 'false',
        rel: 'noopener noreferrer'
    },

this sets _blank for target for all links in the viewer - need to make it dynamic i.e. so that editor can choose whether to open up a link in a new tab/window or same window/tab

ats1999 commented 3 years ago

Currently we can do this using customHTMLRenderer

myrddral commented 2 years ago

linkAttribute option doesn't work in the Viewer in my case, using 3.0.

mmmilan commented 6 months ago

LinkAttribute still doesn't work in the viewer and in the preview window, version 3.2.3.