Help! Valid HTML (attached) mangled by editor

Help! Valid HTML (attached) mangled by editor

por Ian Usher -
Número de respostas: 9

Hello!

I have (valid) HTML from Dreamweaver which includes a form with various fields - the forms calls a standard forms processor outside of Moodle to accept registration information. I'm pasting the HTML into a Moodle-sourced HTML page - I switch to source mode, paste it in, looks OK when I switch back to WYSIWYNG mode, when I save the resource it gets mangled... one of the textareas contains all the HTML which follows it in the page.

Editing the resource shows that many of the < and > markers around the code after the textarea have been converted into their corresponding HTML character entities (&gt; and &lt;)...

If you want to see the code I'm using then it's here - if you view source and paste it into an editor I'd be interested to know what happens...

Any help appreciated, my head's going to explode!

Ian.

Media de puntuacións: -
En resposta a Ian Usher

Re: Help! Valid HTML (attached) mangled by editor

por Ian Usher -
Oooh! Clicking on those HTML glossary entries in my post above gets me a very odd glossary. Is that just me?
En resposta a Ian Usher

Re: Help! Valid HTML (attached) mangled by editor

por Herbert Keijers -
No, I see it also ...

Anexo glossary.png
En resposta a Herbert Keijers

Re: Help! Valid HTML (attached) mangled by editor

por Martin Dougiamas -
Imaxe de Core developers Imaxe de Documentation writers Imaxe de Moodle HQ Imaxe de Particularly helpful Moodlers Imaxe de Plugin developers Imaxe de Testers
It's from the Russian features course on this site.  I've turned off the "Global" setting in that glossary now.
En resposta a Ian Usher

Re: Help! Valid HTML (attached) mangled by editor

por Janne Mikkonen -
If you're importing html material from dreamweaver or some other editor, DO NOT edit it in this editor.

This is not a "real" editor like dreamweaver etc. It just pretend to be one as good as it can. It just can't do complicated stuff like "real" wysiwyg editors.

- Janne -
En resposta a Janne Mikkonen

Re: Help! Valid HTML (attached) mangled by editor

por Ian Usher -

...thanks! Yes, I know it's a basic editor, but I was hoping that it wouldn't touch my (not that complicated if you look at the page) HTML. I don't want to create forms in the editor as I know it's not going to do that... I had only pasted the HTML into Dreawmeaver to do some relevant find & replace operations, followed by a paste-ing back into the editor. In particular the automatic translation of < and > into their entity equivalents is a bit worrying, particularly if I am to persuade other people to make their pre-existing HTML available (and editable) through Moodle.

I'm not sure if it is a "you can't do the <form> tag because you're editing it within a <form> tag" situation or something else...?

En resposta a Ian Usher

Re: Help! Valid HTML (attached) mangled by editor

por Ray Lawrence -
Ian,

How's your head? My reply won't help you at all. I created a web page resource, clicked <> in the full text section and pasted the code copied from the page source in page in the link in your original post.

Works fine!

Ray
En resposta a Ian Usher

Re: Help! Valid HTML (attached) mangled by editor

por Bryan Williams -
Why not just include this form as a Resource (Link to a file or web site) within Moodle? 
En resposta a Bryan Williams

Re: Help! Valid HTML (attached) mangled by editor

por Ian Usher -

I could do that, but I'd like to establish the link to the form from within a Moodle-created page and then have my editors / teachers maintain the look of the form without depending on anyone else to make changes to it.

I will do that if all else fails, but I still got a hope that it won't!

En resposta a Ian Usher

Re: Help! Valid HTML (attached) mangled by editor

por Martin Dougiamas -
Imaxe de Core developers Imaxe de Documentation writers Imaxe de Moodle HQ Imaxe de Particularly helpful Moodlers Imaxe de Plugin developers Imaxe de Testers
It works OK for me in a HTML Resource, no problems. I switched to source mode in the editor, pasted it in and saved it. It will not work in an area like forums where students have access, because the code is stripped of forms and things for security reasons.