google-code-export / jwysiwyg

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

Still can't setContent #104

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What is the expected output? What do you see instead?
I expect to see a jWysiwyg object with html content I specify .... this is
not the case, documentation would be usefull

What version of the product are you using? On what operating system?
Using v0.6 on Mac OS X Leopard

Please provide any additional information below.
I have tried the examples in the Issues section, none resolved my problem.
Here is what I'm doing: 

$('#popup').load('inc/add_category.html', null, function() {
   $('#txtDescription').wysiwyg('setContent', '<p>dsjfjw</p>');
...............etc..

My FireBug gives me this error: 
$.data(this, "wysiwyg") is undefined

This is the last step in my system and it just isn't working, I really need
a fix ASAP

Original issue reported on code.google.com by michael1...@gmail.com on 21 Apr 2009 at 12:59

GoogleCodeExporter commented 9 years ago
Hi I have found a work around for the moment. It is possible to use the code 
below;

$(NameOfObject + 'IFrame').contents().find('body').html(Somehtml);
$(NameOfObject).val(Somehtml);

Where NameOfObject is the object you attached the wysiwyg function to and 
Somehtml is
the html you want to display. Both lines are required to make sure that both the
wysiwyg ui and the hidden element are updated.

Hope this helps,

Matt

Original comment by mattdavi...@googlemail.com on 21 Jul 2009 at 7:52

GoogleCodeExporter commented 9 years ago
Please provide sample of the bug.

Original comment by akzhan.a...@gmail.com on 8 Dec 2009 at 6:21