itween / jwysiwyg

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

jwysiwyg appends again and again when loaded via ajax #62

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Have a link <a href="page.php">Link</a> which is loaded in a DIV via the
load() function
2. Have a form inside with a <textarea id="wysiwyg" name="wysiwyg"></textarea>
3. Click on the link several times

What is the expected output? 
- Single textarea transformed to the wysiwyg editor

What do you see instead ?
- Several textarea transformed to the wysiwyg editor

Firefox 3.0.4
Windows XP Pro
jQuery 1.2.6

I load it via livequery, maybe that's the problem. But if I don't do so it
won't catch focus.

Original issue reported on code.google.com by bskickfl...@gmail.com on 20 Nov 2008 at 11:29

GoogleCodeExporter commented 8 years ago
I would suggest using a callback function for your load function that makes a 
call to
$("foo").wysiwyg(); - that way you know all the content has been loaded into 
the div
before the transformation occurs.

Original comment by switch...@gmail.com on 20 Nov 2008 at 7:47