Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2009-07-27 12:47:55

gerugato
New member
Registered: 2009-07-22
Posts: 1

files ext php (php version 5)

Solution to Ticket #1462 (new defect)

In your php page, in section <header>

change this line:
   <script type="text/javascript" src="../XinhaCore.js"></script>

for this one:
<?php echo "<script type=\"text/javascript\" src=\"../XinhaCore.js\"></script>\n"; ?>

ie:

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Simple example of Xinha</title>

    <script type="text/javascript\">
        var _editor_url  = document.location.href.replace(/examples\/simple_example\.html.*/, '')
        var _editor_lang = "en";
    </script>
    <!-- Load up the actual editor core -->
    <?php echo "<script type=\"text/javascript\" src=\"../XinhaCore.js\"></script>\n"; ?>
    <script type="text/javascript\">
        var xinha_plugins = ['Linker'];
        var xinha_editors = ['myTextArea', 'anotherOne'];
        function xinha_init()
        {
            if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;
            var xinha_config = new Xinha.Config();
            xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
            Xinha.startEditors(xinha_editors);
        }
        Xinha.addOnloadHandler(xinha_init);
    </script>
</head>

Offline

Board footer

Powered by FluxBB