Forums

Problem with TinyMCE

Hi,

I've uploaded the TinyMCE js files to:

/ > home > andybyers > tinymce > jscripts > tiny_mce

And I've set the JS up like this:

<script type="text/javascript" src="/home/andybyers/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>

<script type="text/javascript"> tinyMCE.init({ mode : "textareas" }); </script> </head> <body> <!-- OF COURSE YOU NEED TO ADAPT ACTION TO WHAT PAGE YOU WANT TO LOAD WHEN HITTING "SAVE" --> <form method="post" action="show.php"> <p> <textarea name="content" cols="50" rows="15">This is some content that will be editable with TinyMCE.</textarea> <input type="submit" value="Save" /> </p> </form>

Am I being completely stupid or does JS not operate properly on PA?

The web app does not serve static files from your root directory. If you want to serve tiny_mce.js, put the file in /var/www/static. It will then be available to your webapp app at http://andybyers.pythonanywhere.com/tiny_mce.js.

Cheers glenn - I was being a moron, hadn't set the static file URL or DIR - working now!

http://andybyers.pythonanywhere.com/tinymce