Closed GoogleCodeExporter closed 8 years ago
This way the texarea will automaticly have the value of wysiwyg editor.
When you compress that closure code and put it in its own file it's less than
1kb.
Original comment by cim...@gmail.com
on 12 Feb 2008 at 12:42
I did it at my own way. I don't found the advantage of the closure function. I
added
this lines at the bottom of the init function:
{{{
$('form').submit(function() { self.saveContent(); });
$( $(this.editor).document() ).keydown(function() { self.saveContent(); });
$( $(this.editor).document() ).mousedown(function() { self.saveContent(); });
}}}
From revision 5 it will be available.
See you,
Original comment by joksnet
on 12 Feb 2008 at 2:10
Instead of "keydown" better use "keyup", because otherwise the last character
is not
copied to the textarea - and not submitted within the form.
Original comment by stephan...@googlemail.com
on 13 May 2008 at 1:57
This issue was killing me and "keyup" nailed it. The problem was that i
couldn't load
jWysiwyg on the fly (create an instance in dynamically loaded content). Unless i
loaded the instance with the page it wouldn't catch the last action and send it
to
the textarea. So you'd be left with unfinished words or missing sections of
text if
you had cut an pasted them in.
Line 428 was:
$(this.editorDoc).keydown(function() { self.saveContent(); })
I've changed it to:
$(this.editorDoc).keyup(function() { self.saveContent(); })
I'm wondering if i'm missing something here (i'm a bit simple sometimes) or if
this
should be an official permanent change?
Cheers.
Original comment by afi...@gmail.com
on 11 Jun 2008 at 11:23
I've change it to
$(this.editorDoc).keyup(function() { self.saveContent(); })
.mouseout(function() { self.saveContent();});
Original comment by danlee...@gmail.com
on 18 Jun 2008 at 7:48
[deleted comment]
I've changed it to:
$(this.editorDoc).keyup(function() { self.saveContent(); })
I did the same thing and it works fine !
Original comment by benoit....@gmail.com
on 1 Dec 2008 at 4:31
I have some problems becuase when you wirte the textarea doen't update at the
same
time I add this
$(this.editorDoc).keydown(function() { self.saveContent(); })
.mousedown(function() { self.saveContent(); })
.keyup(function() { self.saveContent(); }); // ADD BY ME
Original comment by rigo.fas...@gmail.com
on 23 Jan 2009 at 5:34
insertImage : {
visible : true,
exec : function()
{
if ( $.browser.msie )
this.editorDoc.execCommand('insertImage', true, null);
else
{
/*var szURL = prompt('URL', 'http://');
if ( szURL && szURL.length > 0 )
this.editorDoc.execCommand('insertImage',false,szURL); */
var name="file"+fupload;
var szURL = "";
var docMoc = this.editorDoc;
jQuery('#fileUpload').append("<input type='file' class='"+name+"'
name='images[]' /><br>");
jQuery("input."+name+"").change(function(e){
$in=$(this);
var random_=Math.floor((Math.random()*1000)*(Math.random()*100));
szURL = "../files/"+random_+""+$(this).val();
docMoc.execCommand('insertImage', false, szURL);
jQuery('#fileUpload').append("<input type='hidden' value='"+random_+"'
name='fnames[]' /><br>");
jQuery('#textarea2IFrame').focus();
////******how do i save the jWysiwyg editor text to textarea2 without clicking back on jWysiwyg editor.
});
/**/
}
Original comment by rjli...@gmail.com
on 14 Jun 2010 at 10:09
hey there, how could I modify the onKeyUp event to give me character count. if
possible. Thanks
Original comment by taimoor....@gmail.com
on 8 Jul 2011 at 12:28
Original issue reported on code.google.com by
cim...@gmail.com
on 12 Feb 2008 at 12:41