#1036 DHTML editor removes new lines from code and quotes.

XOOPS_2.6.x
open
nobody
5
2012-09-25
2009-12-14
No

When using the standard dhtml editor for inserting quotes or code fragments, the line feeds are removed.
The popup box to receive the fragment should not be a one line textfield but a text area, so the new lines are preserved.
Eg assume following code fragment:
function isGuest()
{
return false;
}
When pasting this in eg a forum post and typing manualy the [code] and [/code] tags before and after, gives the right result.
If you click on the code icon (http://www.xoops.org/images/code.gif) and paste the fragment in the popup field, you get this in your code window in the post:
function isGuest() { return false; }
This makes larger code fragments unreadable.
http://www.xoops.org/modules/newbb/viewtopic.php?post_id=320317#forumpost320317
The same goes for the quote function.

If you paste the fragment in the post, select it and then click on the code icon, the result is also OK.

Discussion

  • MusS
    MusS
    2011-09-23

    Javascript prompt is only on a single line.
    Actually dhtml editor use standard javascript functions.
    Editor can be changed for next release