taoguan / jwysiwyg

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

Load html content inside the editor #84

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. new wysiwyg editor
2. ajax load html

What is the expected output? What do you see instead?
I'd like to inject html inside the editor.
I've tried setContent() method but does not work.

What version of the product are you using? On what operating system?
Linux Ubuntu 7.10, Firefox 3, jQuery 1.3

Original issue reported on code.google.com by antonino...@gmail.com on 24 Feb 2009 at 11:20

GoogleCodeExporter commented 8 years ago
Found a way looking inside the source:
$( $('#<your textarea id>IFrame').document() ).find('body').html(<your html>);

Original comment by antonino...@gmail.com on 24 Feb 2009 at 11:43

GoogleCodeExporter commented 8 years ago
Also you can:

$('#wysiwyg').wysiwyg('setContent', 'newContent');

Original comment by joksnet on 21 Apr 2009 at 12:21