GetSimple Support Forum
[SOLVED] How2 show \r\n in code - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Scripts & Components (http://get-simple.info/forums/forumdisplay.php?fid=11)
+--- Thread: [SOLVED] How2 show \r\n in code (/showthread.php?tid=7859)



[SOLVED] How2 show \r\n in code - jwzumwalt - 2016-01-15

When I put a code listing in CKEDIT, it removes all backslashes such a c language return & newline.
How can I force CKEDIT not to modify text?

i.e
Code:
printf("some text\r\n");
becomes
printf("some textrn");



RE: How2 show \r\n in code - shawn_a - 2016-01-15

Use entities or put it in code or pre tags?


RE: How2 show \r\n in code - jwzumwalt - 2016-01-16

(2016-01-15, 23:09:04)shawn_a Wrote: Use entities or put it in code or pre tags?

Neither <pre>, <code>, or <xmp> (or both, or all) solve the problem.

I don't know what you mean by entities?


RE: How2 show \r\n in code - Carlos - 2016-01-16

Does it happen also with ckeditor disabled?


RE: How2 show \r\n in code - shawn_a - 2016-01-16

I do not see this behavior.


RE: How2 show \r\n in code - Carlos - 2016-01-16

I don't either. Tested again with magic quotes enabled too.
Perhaps some plugin...


RE: How2 show \r\n in code - jwzumwalt - 2016-01-16

(2016-01-16, 03:29:36)Carlos Wrote: I don't either. Tested again with magic quotes enabled too.
Perhaps some plugin...

Thanks for the replies.

This has been a constant issue since I first started using GS a month ago. CKEDIT keeps screwing with code format. If I want a <br>, it usually replaces with <p>&nbsp;</p>. If I want a line indented for clarity, it re-indents the way it thinks it should be. The list goes on....

Is there other options for text editors?
I am using the default ckedit 3.xxx that came with GS, how can I upgrade to 4.x?

Other than this problem, I now have GS working pretty much how I want and really like it.


RE: How2 show \r\n in code - shawn_a - 2016-01-16

That is entermode_br settable.

Install the cke_patch plugin for 4.x

There are alot of options for ckeditor to change its behavior, and the docs are not that user friendly.

is it possible you have a plugin or a gsconfig setting messing your settings up ?


RE: How2 show \r\n in code - jwzumwalt - 2016-01-17

(2016-01-16, 07:29:58)shawn_a Wrote: That is entermode_br settable.

Install the cke_patch plugin for 4.x

There are alot of options for ckeditor to change its behavior, and the docs are not that user friendly.

is it possible you have a plugin or a gsconfig setting messing your settings up ?

Well, none of the above fixed the problem.

UPDATE:
After considerable switching back and forth between a fresh GS install, I found it was the "Custom Title" plugin that was causing the trouble Sad

Thanks for all the help