Pregunta

I am fairly new to using Ace Editor. I am trying to develop a small tool using the library and I would like to be able to add hyperlinks inside the editor.

So far I have been able to replace plain text with hyper links using:

editor.renderer.on('afterRender', function(){
    // replace specific text with hyperlinks
});

The only thing is that the links are not clickable. I was wondering if there is anyway to make them clickable to have the behaviour I want.

Thank you in advance.

¿Fue útil?

Solución

Links are not clikable because of pointer-events:none style on the editor, you can add css to override that, but it won't work on IE < 11. Answer at https://groups.google.com/d/msg/ace-discuss/XFnf3-3gcAY/O3w8T5aF8ZUJ uses a different way to implement links which will work on old browsers See jsbin example at http://jsbin.com/jehopaja/4/edit

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top