Question : JavaScript: Insert text inside link

I use this code:
1:
2:
3:
4:
5:
tinyMCEPopup.execCommand('mceInsertContent', false, dom.createHTML('a', {
			class : 'special',
			title : 'my link',
			href : '/'
		}));



 It creates this:
1:
<a href="/" class="special" title="my link"></a>



 How can I add text inside the link?  This does NOT work:  
1:
2:
3:
4:
5:
6:
tinyMCEPopup.execCommand('mceInsertContent', false, dom.createHTML('a', {
			class : 'special',
			title : 'my link',
			href : '/',
			innerHTML : 'Link Text'
		}));

Answer : JavaScript: Insert text inside link

The innerHTML part needs to be a 3rd argument in the createHTML method.
1:
2:
3:
4:
5:
6:
tinyMCEPopup.execCommand('mceInsertContent', false, dom.createHTML('a', {
			class : 'special',
			title : 'my link',
			href : '/'},
			'Link Text'
		));
Random Solutions  
 
programming4us programming4us