ModeFile - How to make a clickable, highlighted object

StrongED highlights such URLs as www.stronged.torrens.org (but not in HTML mode!) and if you click on it the URL will be launched. However stronged.torrens.org 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.

Highlighting

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 torrens.org 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
	.torrens.org
End
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.

Clickability

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("torrens.org<StrongED$Tmp_MarkWord>:") as an extra line in Clicklist Select2 and also | "torrens.org" to the Search scheme thus scheme "https://" | "http://" | "ftp://" | "telnet://" | "file:/" | "mailto:" | "news:" | "stronghelp:" | "torrens.org" 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
url/png
it is coloured correctly and if I click on the coloured bit the browser accepts it - but it has been told to go to torrens.org/man/index.html - which of course does not exist! I wanted stronged.torrens.org/man/index.html!

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

http://css.torrens.org/valid-html401-bluehttp://css.torrens.org/valid-css Document URI: http://stronged.torrens.org/man/modes/examples/clickable.html
Page first published Wednesday 19th of September 2018
Last modified:Mon, 24 Sep 2018 08:36:30 BST
© 2018 - 2018 Richard Torrens.