DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

ckEditor adds multiple CR-LF chars upon saving

Sort:
You are not authorized to post a reply.





New Around Here





    This problem doesn't affect the HTML tags or display on site, but in the DNN HTML editor, code created or pasted in the Source mode, after saving the first time, ckEditor has created a lot of extra CR-LF characters between each HTML element making it difficult to edit in the editor. I always have to copy it out to an external editor and paste it back in, which I would do normally anyway, but for our clients making simpler edits it's a major inconvenience.

    My guess is this is some kind of misconfiguration of the ckEditor settings, but I can't guess which it would be. 






    Veteran Member





      This isn't something that happens by default.  There must be something more to it...  🤔 

      Are you using the "Rich Text Box" setting, or "Basic Text Box"?  This only happens when you choose the Basic Text Box mode, then edit using the Text render mode.  If you use the HTML render mode with Basic Text Box, there are no additional line breaks added.  






      Veteran Member





        Can you post an example of what you enter and what is saved?






        New Around Here





          Thanks very much for responding on this, Will and Timo! I'm sure it's some weird misconfiguration in my install.

          Will - when I open the editor, it shows I'm using the Rich Text editor. I never switch that back and forth - but it does seem to be a good explanation that it's converting new lines in the source into CR/LF characters.

          Timo - I'll attach an image showing the before and after, as shown in my external code editor so that I can show the special characters added. The top 12 lines are the original source I copied into the editor's Source pane. I then saved, then went back in to edit again. The bottom part from line 13 down shows what has been added after saving and reopening. The added characters do not affect the rendered HTML display, they are just CR/LF characters. (just to be clear, I pasted both the before and after examples one after the other in this external code editor for convenience).

          I'll check through my ckEditor configuration again and see if I can find anything regarding Basic Text box vs Rich Text settings.






          Veteran Member





            Ah, that's indeed interesting.  I haven't seen that one yet myself... Have you, Timo?  






            Growing Member





              I saw something similar with an old site, back at version 5 or 6 I think that was then upgraded. Is this an upgrade to a relatively old site?
              Unfortunately I can't remember exactly how I resolved it, though I vaguely recall it being adversely affected by custom IIS rewrite rules that were designed to "fix" presentation of some content - or it might have been due to a web browser plugin to "help" spelling??
              You are not authorized to post a reply.

              These Forums are dedicated to the discussion of DNN Platform.

              For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

              1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
              2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
              3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
              4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
              5. No Flaming or Trolling.
              6. No Profanity, Racism, or Prejudice.
              7. Site Moderators have the final word on approving / removing a thread or post or comment.
              8. English language posting only, please.

              Would you like to help us?

              Awesome! Simply post in the forums using the link below and we'll get you started.

              Get Involved