Wow! That's quite a suggestion!
Thanks - I'll try and decipher the code and see what I come up with :)
In the meantime, I've found a workaround. I've defined the object to
accept only an array of discrete values - a, em, i, h1, li etc. This
seems to work. Here is the result:
http://www.bhagwad.com/blog/2009/technology/inserting-html-tags-using-firefox-ubiquity.html
- the code is updated. Need to change the post to allow users to put
the URL for the "link" tag.
On Oct 17, 4:28 am, satyr <
murky.sa...@gmail.com> wrote:
> You'd have to write a custom noun of your own, like this:
>
> var noun_type_url_noselection = {
> label: "URL",
> suggest: function ntun_suggest(txt, htm, cb, selectionIndices) {
> if (selectionIndices) return []; // suggest none for selection
> if (/^(?!\w+:)/.test(txt)) txt = "http://" + txt;
> return [CmdUtils.makeSugg(txt, null, null, .5)];
> },
>
> };