I am using the Htmlviewer. I would like to use a new link identifier ie md:///somefile.markdown When the link is clicked I would like for a custom method to be called. Is there a way to add a new identifier link type to call a user defined method when the url link is clicked? If not, is there a third party htmlviewer that natively supports processing and displaying markdown files?
Thank you,
Rob
[quote=223422:@Robert Kantor]I am using the Htmlviewer. I would like to use a new link identifier ie md:///somefile.markdown When the link is clicked I would like for a custom method to be called. Is there a way to add a new identifier link type to call a user defined method when the url link is clicked? If not, is there a third party htmlviewer that natively supports processing and displaying markdown files?
Thank you,
Rob[/quote]
Use the CanceLoad event to see what has been clicked, then use instr() or left() to see if the URL starts with md:///, then process it as you like and return true to avoid the HTMLViewer to try and load the link.
http://documentation.xojo.com/index.php/HTMLViewer.CancelLoad
http://documentation.xojo.com/index.php/Instr
http://documentation.xojo.com/index.php/left