views:

37

answers:

1

Hi!

In Tinymce I select an image. I would like to create a link with this:

var code = window.opener.tinyMCE.activeEditor.selection.getContent(); window.opener.tinyMCE.activeEditor.selection.setContent(code); but not work.

If i select a text then work correctly!

Please help me i dont understand that why???

+1  A: 

What you are doing here wont't work because you just get the selection context and set it to this context - so nothing changes!

Thariama