I could probably come up with the required javascript code to
highlight a text element if it contains the word "error". But how do I
tie it up to the event of new text being added to the messageArea div?

There is no such event, so you probably wanna hijack the displayMessage
function, like so:

    (function($) {

    var _displayMessage = displayMessage;
    displayMessage = function(text,linkText) {
        _displayMessage.apply(this, arguments);
        var el = $("#messageArea");
        var msg = el.html().
            replace(/\b(error)\b/ig, "<strong>$1</strong>");
        el.html(msg);
    };

    })(jQuery);

Technical details:
http://tiddlywiki.org/wiki/Dev:Best_Practices#Extending_Core_Functionality
http://tiddlywiki.org/wiki/Dev:Hijacking

Please note that strictly development-related issues are better discussed on the dev group:
    http://groups.google.com/group/TiddlyWikiDev/
You're more likely to get competent help there.


-- F.

--
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to