ModeFile - How to make a clickable, highlighted object

StrongED highlights such URLs as (but not in HTML mode!) and if you click on it the URL will be launched. However is not recognised as a URL so is neither highlighted nor clickable. How to make so?

Highlighting is totally separate to making a word clickable so this would require two different sections of the ModeFile to be altered.


Hightlighting has limitations. StrongED can only highlight the rest of the item following the recognised bit. So I can only make this work by recognising a bit that is common to all my sub-domains - i.e. the bit. How to do this is explained in the Syntax of a ModeFile but what I did was to include in the BaseMode Modefile, SyntaxWords section the line
SyntaxWords Group6 EndOfExpr ee_url nocase
Then do an IconBar -> RescanDir -> Modes and it works, colouring the URL from the .torrens bit to the following space (that's what EndOfExpr does). Now open the Mode's Choices -> Colours, click on the Element Menu -> Group 6 and select foreground and background colours to choice.


Unfortunately you cannot make the full URL clickable! Although you can launch the text, only the string starting with the recognised bit will be launched. To do this, I would have to add www BroadcastURL("<StrongED$Tmp_MarkWord>:") as an extra line in Clicklist Select2 and also | "" to the Search scheme thus scheme "https://" | "http://" | "ftp://" | "telnet://" | "file:/" | "mailto:" | "news:" | "stronghelp:" | "" so that the clicked text was broadcast as a URL.

This does what it says on the tin... If I have a URL as below
it is coloured correctly and if I click on the coloured bit the browser accepts it - but it has been told to go to - which of course does not exist! I wanted!

However, for the present, having the colouring working is of some use - better than nothing!

There is more to follow on this subject...

Other relevant pages

Top of page

Page Information Document URI:
Page first published Wednesday 19th of September 2018
Last modified:Mon, 24 Sep 2018 08:36:30 BST
© 2018 - 2018 Richard Torrens.