Many Thanks Mauno
You have fixed my problem
My conclusion is : if i need to edit/debug web pages with javascripts, the better way is to use an external HTML editor and after paste the code in the MOODLE HTML editor with the "standard web forms" option