Hi. I added few listeners to be able to open links in browser using ctrl/meta key. It's a bit flickering, but works for my needs, so maybe it could be useful for someone else as well.
https://github.com/xbup/xbup-java/blob/1990be5e2013df25e5a03f6118a6d6d26888f758/modules/simplyhtml/src/main/java/com/lightdev/app/shtm/DocumentPane.java
hello Miroslav,
thanks for contributing.
I just tried your patch (DocumentPane.java changes), but I cannot see how
clicking on hyperlinks in the editor pane works now. Can you elaborate?
Also, would you be willing to fix bugs in your implementation
(which is necessary for us to be able to include this in simplyhtml/freeplane)?
Thanks and Best Regards,
Felix
Hi Felix,
I apologize, I sure should make it more clear, that I don't recommend this code to be included in the project itself, at least not as it is. More like as an additional feature for someone who might need something like that. What it do:
Local or special links are not supported in this patch. I cannot promise to fix bugs, I'm willing to try, but my experiences with Java are somehow limited. For example fixing that small flickering I mentioned might require subclassing and overriding JEditorPane, in worst case even reintroducing modified copy of that class which might be a bit complicated think to do and I wanted to keep the patch as small as possible...
Thanks for your reaction and keep up good work,
Miroslav
I took a look on code again and found out, that there is actually hyperlink event handler I can register to use for CTRL+click, so I see what you meant, that it's no different. So then this patch might be only partly useful for mouse cursor shape changing then.