Help! Valid HTML (attached) mangled by editor

Help! Valid HTML (attached) mangled by editor

di Ian Usher -
Numero di risposte: 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 dei voti:  -
In riposta a Ian Usher

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

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

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

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

Allegato glossary.png
In riposta a Ian Usher

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

di 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 -
In riposta a Janne Mikkonen

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

di 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...?

In riposta a Ian Usher

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

di 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
In riposta a Ian Usher

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

di Bryan Williams -
Why not just include this form as a Resource (Link to a file or web site) within Moodle? 
In riposta a Bryan Williams

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

di 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!

In riposta a Ian Usher

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

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