Search code examples
javascriptextjsextjs4

Extjs show link on a single word


How can I show a link in a single word like so :

 Click **here** (link only when clicking on the word here)

I manage to create a link component with Extjs like this (I'm using Extjs 4.1), but the problem is that link is on the whole phrase.

    {
        xtype : 'component',
        autoEl: {
            tag: 'a',
            target: '_blank',
            href: 'help/GUI_help.html',
            html: 'Help on GUI.'
        }
    }

Any help would be appreciated.


Solution

  • This is probably the simplest solution:

    {
        xtype: 'component',
        html: 'Help on <a href="help/GUI_help.html" target="_blank">GUI</a>'
    }