Recently, I've been exploring the amazing capabilities of a tool called Medium Editor. However, I've come across an issue where I can't seem to get links to function properly.
To illustrate the problem simply, here is some HTML/JS code that showcases the issue:
HTML:
<html>
<head>
<script src="//cdn.jsdelivr.net/medium-editor/latest/js/medium-editor.min.js"></script>
<link rel="stylesheet" href="//cdn.jsdelivr.net/medium-editor/latest/css/medium-editor.min.css" type="text/css" media="screen" charset="utf-8">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/medium-editor/latest/css/themes/beagle.min.css" type="text/css">
</head>
<body>
<div class='editable'>
Hello world. <a href="http://www.google.com">link</a>
</div>
</body>
</html>
Javascript:
var editor = new MediumEditor('.editable');
This example highlights the issue mentioned above (using the provided code).
- When hovering over the link, a popup appears.
- Clicking on the link does not redirect you to the specified URL.
- By clicking on the popup, a form emerges allowing you to modify the link.
It seems logical that clicking on the link should direct the user to the target location specified by its href
. Having users right-click and open in a new tab/window is not ideal for usability.
I have a feeling that there might be a simple configuration setting that I am missing, perhaps related to the Anchor Preview Options or the Anchor Form Options. Unfortunately, I haven't been able to identify it yet.
In my application, I am not utilizing jQuery
, but I am incorporating angularjs
. If there isn't a direct solution within Medium Editor, I am open to using vanilla JS or leveraging angularjs features as alternatives.