I’m using a MatchDecorator
to transform URLs and e-mail addresses into links:
Decoration.mark({
tagName: 'a',
attributes: {
href: url,
target: '_blank',
class: 'cmt-url'
}
})
This resulting DOM looks correct, having <a class="cmt-url" href="…">
tags around URLs. However, the tags do not behave like links:
- Clicking doesn’t open the URL but setting CM’s cursor
- Hovering doesn’t show the URL at the bottom left of the browser like with all ordinary links
- Right-clicking doesn’t show the default link entries like “Open in a new tab“ etc.
Do I need to tell CM somehow to disable Click handling in link elements?