Help! Valid HTML (attached) mangled by editor

Help! Valid HTML (attached) mangled by editor

de Ian Usher -
Número de respuestas: 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.

Promedio de valoraciones: -
En respuesta a Ian Usher

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

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

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

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

Adjunto glossary.png
En respuesta a Ian Usher

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

de 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 respuesta a Janne Mikkonen

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

de 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 respuesta a Ian Usher

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

de 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 respuesta a Ian Usher

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

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

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

de 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 respuesta a Ian Usher

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

de Martin Dougiamas -
Imagen de Core developers Imagen de Documentation writers Imagen de Moodle HQ Imagen de Particularly helpful Moodlers Imagen de Plugin developers Imagen 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.