I wonder if theres a way to add a html code to the tinymce textbox through a link outside the texbox. Say we have a link that looks like this:
<a href="#" onclick="addimage"><img src="img.jpg" width="30px" height="30px" /></a>
And when i click the link img.jpg I would like img.jpg added to the textbox appearing as an image.
So basicly adding an image to the textbox without having to drag it there.
Best regards
You can embed a javascript function and a handler in the tinymce parent page (the page your image is located at). This function would call something like the following
UPDATE: Here is an example. You might need to tweak this code a bit, casue it will only work if the image you clicked is the only child of its parent. I suggest du work with the image attributes here instead of element.parentNode.innerHTML
UPDATE2: This is the implementation of my own suggestion:
UPDATE3: inserts image element + src attribute only: