1

Topic: CodeMagic - does not respect <pre> code with line breaks

  1. Go to http://codemagic.sutulustus.com/

  2. Look for the live Demo window

  3. Inside live Demo window, look at tinyMCE.init example code (it's under "Usage")

  4. Notice that the tinyMCE.init code is displayed nicely in several lines (that's because it is in <pre> tags)

  5. Click HTML button (Edit source code)

  6. Click Update button

  7. Notice that the tinyMCE.init code is displayed all in one line

This means that in the HTML window the new lines were stripped and the same happens on my site. Is there a method to preserve the line breaks inside <pre> tags?

Last edited by startlink (2012-02-13 14:07:27)

2

Re: CodeMagic - does not respect <pre> code with line breaks

startlink wrote:

4. Notice that the tinyMCE.init code is displayed nicely in several lines (that's because it is in <pre> tags)

Can't confirm that. In my HTML view the code inside the <pre> element is shown in a single line.

Greetings from Germany,

Felix Riesterer.
(-> about me and this forum <-)

3

Re: CodeMagic - does not respect <pre> code with line breaks

Felix Riesterer wrote:
startlink wrote:

4. Notice that the tinyMCE.init code is displayed nicely in several lines (that's because it is in <pre> tags)

Can't confirm that. In my HTML view the code inside the <pre> element is shown in a single line.

I was not referring to HTML view in this point, only to Wysiwyg view.

4

Re: CodeMagic - does not respect <pre> code with line breaks

startlink wrote:

I was not referring to HTML view in this point, only to Wysiwyg view.

But that's the point, isn't it? As soon as you open the HTML code view the newline characters get messed up which in turn causes the application of the modified source to change the WYSIWYG view to render all the code in a single line.

I thought you were looking for a reason to your visual changes...?

Greetings from Germany,

Felix Riesterer.
(-> about me and this forum <-)

5

Re: CodeMagic - does not respect <pre> code with line breaks

Please look at this image with 2 screenshots:
http://img706.imageshack.us/img706/6803/tinyo.png

On the first screenshot, the tinyMCE.init code is formatted well. Then on the second, it's messed, after Update from CodeMagic.

By the way, the regular HTML view does not mess the code, only CodeMagic HTML view.

6

Re: CodeMagic - does not respect <pre> code with line breaks

startlink wrote:

By the way, the regular HTML view does not mess the code, only CodeMagic HTML view.

Yes, and it does this upon opening the code view dialog. Your problem starts before you click the "apply" button!

Greetings from Germany,

Felix Riesterer.
(-> about me and this forum <-)