Active
Project:
Link to content
Version:
5.x-1.7
Component:
Code: Javascript
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Aug 2008 at 11:30 UTC
Updated:
19 Jul 2009 at 22:10 UTC
When you select an image and choose linktonode (and some node) it replaces the image with the title of the node.
When you select some random text - and do the same - the text simply is enclosed in the tags.
it should ofcourse just enclose the
tag in the tags. I have looked at the JS script - but I've coded JS before - so I couldn't see any obvious explanations.
Comments
Comment #1
kingandyI'm encountering this as well. I think it's to do with the difference between the way the text editor selects text (highlighted), and the way it selects an image by itself (with the resizing handles). The substitution works fine if you select the image along with some text.
I would suggest taking a look at the standard "Add/Edit Link" plugin and seeing how that handles the same situation ... unfortunately I don't have time to do it myself :(
(In case it isn't clear - klavs is talking about <IMG> and <A> tags, which the issue filters removed and treated as HTML, respectively.)
Comment #2
DrewMathers commentedAs a workaround, you can use TinyMCE's own hyperlink insertion, which requires typing the address manually. It works fine hyperlinking images. This would also be a good place to look for differences in the code.