I'd like to use a wymeditor in a jquery UI Dialog but all options such as bold, tables etc does not work in Firefox (I'm using FF 3.5.2)
Please try this code, open the dialog in FF and try to create a table:
- Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" >
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<link type="text/css" href="css/ui-lightness/jquery-ui-1.7.2.custom.css" rel="Stylesheet" />
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript" src="wymeditor/jquery.wymeditor.js"></script>
<script type="text/javascript">
$(function() {
$('#cap_text').wymeditor({
postInit: function(wymEditor) {
wym = wymEditor
}
});
$("#cap_form").dialog({
bgiframe: true,
autoOpen: false,
width: '80%',
modal: true,
buttons: {
Cancel: function() { $(this).dialog('close') }
}
});
$('#add_cap').click( function() {
$('#cap_form').dialog('open');
});
});
</script>
</head>
<body>
<div id="cap_form" title="jquery UI dialog">
<form>
<fieldset>
<textarea name="cap_text" id="cap_text"></textarea>
</fieldset>
</form>
</div>
<div><a href="#" id="add_cap">Open Dialog</a></div>
</body>
</html>
FF shows in js errors console this error:
Error: document.body is null
File: js/jquery-1.3.2.min.js
Row: 19