HTML editor and newlines

HTML editor and newlines

by Leif Johnson -
Number of replies: 1
We're using moodle 1.9.4

I'm trying to post web pages inside of moodle that contain a web form to a different web page. This form contains a 'textarea' element that contains formatted text. This text is code to be run in a RWeb server. Newlines are an integral part of this formatting, removing/changing newlines invalidates the code.

Switching from WYSIWYG html editor to the code view removes the newlines from the html code and breaks the code in the textarea. If I switch to the code view, create the page, save and display it everything is fine. But if I want to edit the page later, the WYSIWYG editor removes the newlines and breaks the code, it doesn't matter if I switch the view, all I need to do is to open and save the page in the WYSIWYG editor.

My current work around is to go to my profile and change "When editing text" from "Use HTML editor" to "Use standard web forms".

Is this a bug? Are there any other solutions?

leif


Average of ratings: -
In reply to Leif Johnson

Re: HTML editor and newlines

by Mauno Korpelainen -
It's a "bug/feature" called "HTMLArea" wink

You have found the best available solution in moodle 1.9 to disable editor from user profile in cases like this. In moodle 2.0 and TinyMCE it will be possible to change behaviour of editor with different editor configurations.