rizkit1 / jwysiwyg

Automatically exported from code.google.com/p/jwysiwyg
GNU General Public License v2.0
0 stars 0 forks source link

How to set the initial value for the WYSIWYG editor. #45

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I need to open the WYSIWYG editor when I double click on the text. So I
need to set the previous value to the editor.For that I used this code.

var iframe = $("#wysiwygIFrame"); 
var edit_body = $(iframe.document()).find('body');
edit_body.html(this.description);

But this is giving 

"Permission denied to get property HTMLDocument.nodeType' when calling
method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e
(NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no"

 error in firefox 2.0.0.16. It is working  fine in IE6 and firefox3.

When I debug I found that 
iframe.document() is returning "Document about:blank" in firefox2.0.0.16
but in firefox 3 it is returning "Docuemnt #" and it is having body.

Is this bug in the firefox2.0.0.16 or in plugin?
But It would be good if there is a function to set the initial value.

Original issue reported on code.google.com by m.prajw...@gmail.com on 22 Sep 2008 at 12:20

GoogleCodeExporter commented 8 years ago
To set content dynamically to wysiwyg editor I added one function. so that when 
I run
the following command it will assign the new value dynamically.

 #('#wysiwyg').wysiwyg('setValue', 'new value'); 

I attached patch to this message.

Original comment by m.prajw...@gmail.com on 26 Sep 2008 at 10:40

Attachments:

GoogleCodeExporter commented 8 years ago
Fixed at Revision 25

Original comment by joksnet on 26 Sep 2008 at 1:21

GoogleCodeExporter commented 8 years ago
plz help me, i want to display values in wysiwyg textarea, but i dont knw where 
to place function  #('#wysiwyg').wysiwyg('setValue', 'new value');?

Original comment by omais2...@gmail.com on 9 Aug 2010 at 7:18