tinyMCE clickable link

HTML

<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
<div id="tinymce">
  <p>User should be able to <a id="mylink" href="http://google.com" onclick="hallo()">navigate to a link</a> and also edit the text by clicking outside the link.</p>
</div>
<a id="mylink" href="#" onclick="console.log('hola')">TSTST</a>

JavaScript

tinymce.init({
  selector: '#tinymce',
  inline: true,
  extended_valid_elements: 'a[onclick|href|id]'
});

$('#mylink').on('click', function(e) {
  // This never fires
  console.log('Link clicked...');
});

function hallo()
{
console.log('hsdasdajsdkdasjkdask');
}