HTML editor breaks my code

Re: HTML editor breaks my code

by Visvanath Ratnaweera -
Number of replies: 0
Picture of Particularly helpful Moodlers Picture of Translators
Hi Guillermo

The definition 'line break' = 'white space' is known to me. That is the case in the TeX family of markup (LaTeX, Beamer, ...) and also in XML/SGML based markup (HTML(5), XML, AsciiDoc, DocBook, ...). When you think of it, if one decides to go for markup, one has to stop "formatting" with hard line breaks!

The dispute is, all these markup languages have a verbatim environment. I thought <code> is verbatim, obviously a mistake: only <pre> is.

As for "formatting" with &nbsp; and <br /> tags, imagine doing that for program code copied in to HTML!

Also note that we are talking about two kinds of editors in one go: the 'Plain text area' (<textarea>) and WYSIWYG (TinyMCE, Atto).