taoguan / jwysiwyg

Automatically exported from code.google.com/p/jwysiwyg
0 stars 0 forks source link

Won't return image until clicked. #179

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I am trying to create an insertImage function for a project i'm working on.  

When i use the insert image function and get the val() it display nothing. But 
if i use the 
insertImage function and then click the image or type something and use val() 
it returns it. 

So basically if i just insert an image and want to get the value it doesn't 
read the image till i click 
on it.

I have tried this on all browsers.  

Here is a sample code below. 

  <div>
    <textarea name="wysiwyg" id="wysiwyg" rows="5" cols="47"></textarea>
  </div>
  <a onclick="alert($('#wysiwyg').val())">Test</a>

  <p></p>
  <p></p>

  <a onclick="$('#wysiwyg').wysiwyg('insertImage', 'http://www.google.com/logos/earthday10-
hp.gif');">Insert</a>

Thanks!

Original issue reported on code.google.com by tyfeathe...@gmail.com on 22 Apr 2010 at 5:35