Last published: December 13, 2011 by 'jkott'
Defines 1 Classes
Extends 13 Classes
This package adds a reusable HyperlinkHighlighter and uses it to mark hyperlinks in the comment tool. It will highlight any valid HTTP reference.
To reuse the highlighter in your application model, make sure #addHighlighters is invoked in its #postBuildWith: method, and add an extension method along these lines:
HyperlinkHighlighter on: (self widgetAt: #TheIdOfTheWidgetYouWantToHyperlink) controller
You can use methods in the HyperlinkHighlighter configuring protocol to control when the highlighter works through settings. By default, it uses the "forPlain" method, which restricts only by the master spell-checking switch. If you wanted to tie this, for example, to the comments switch, your extension method would look like this:
(HyperlinkHighlighter on: (self widgetAt: #TheIdOfTheWidgetYouWantToHyperlink) controller) forComments
You can add your own hyperlink restriction controls and settings using the configuring methods as examples.