Forum closed. New forum available at http://community.wymeditor.org/

WYMeditor not working in jqueryUI Dialog [Firefox]

Support forum for WYMeditor.

WYMeditor not working in jqueryUI Dialog [Firefox]

Postby neurino on Wed Oct 07, 2009 8:06 am

Hi,

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
neurino
 
Posts: 1
Joined: Thu Sep 24, 2009 11:26 am

Re: WYMeditor not working in jqueryUI Dialog [Firefox]

Postby rudygotya on Fri Oct 09, 2009 12:53 pm

Hi,


take a look at the jqueryui documentation how to implement ajax content. Then use an a tag navigation class selector and everything works.

regards
rudygotya
 
Posts: 2
Joined: Tue Oct 06, 2009 3:15 am


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests