Help! Valid HTML (attached) mangled by editor

Help! Valid HTML (attached) mangled by editor

Bởi Ian Usher -
Số lượng các câu trả lời: 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.

Trung bình điểm đánh giá: -
Để phản hồi tới Ian Usher

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

Bởi Ian Usher -
Oooh! Clicking on those HTML glossary entries in my post above gets me a very odd glossary. Is that just me?
Để phản hồi tới Ian Usher

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

Bởi Herbert Keijers -
No, I see it also ...

File đính kém glossary.png
Để phản hồi tới Herbert Keijers

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

Bởi Martin Dougiamas -
Hình của Core developers Hình của Documentation writers Hình của Moodle HQ Hình của Particularly helpful Moodlers Hình của Plugin developers Hình của Testers
It's from the Russian features course on this site.  I've turned off the "Global" setting in that glossary now.
Để phản hồi tới Ian Usher

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

Bởi 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 -
Để phản hồi tới Janne Mikkonen

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

Bởi 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...?

Để phản hồi tới Ian Usher

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

Bởi 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
Để phản hồi tới Ian Usher

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

Bởi Bryan Williams -
Why not just include this form as a Resource (Link to a file or web site) within Moodle? 
Để phản hồi tới Bryan Williams

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

Bởi 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!

Để phản hồi tới Ian Usher

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

Bởi Martin Dougiamas -
Hình của Core developers Hình của Documentation writers Hình của Moodle HQ Hình của Particularly helpful Moodlers Hình của Plugin developers Hình của 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.