21301 Posts in 5736 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 722 Views |
-
Non-breaking spaces in editor

26 July 2009 at 2:01am
I'm using the latest version 2.3.2 and I'm sure this has only started happening, but when I edit content via the admin area I keep getting lots of non-breaking spaces included. It doesn't seem to happen as you type a sentence to start with, but if you later go back in and edit it that's when it seems to be happening. I first noticed when some sentences were no wrapping on site pages themselves as I would expect them to, and then when viewing HTML for a content area realised that this was due to lots of non-breakign spaces that seemed to have been added as I edited the content. Maybe i'm being thick here but is this something I can control maybe via some editor settings?
thanks
-
Re: Non-breaking spaces in editor

5 December 2009 at 12:26pm Last edited: 5 December 2009 12:27pm
I'm having the same issue, but with the javascript I add.
I have included the code in the LeftAndMain.php file to include javascript. My html stays fine, but the javascript added to the page keeps seporating - I think maybe on saving, closing the editor window.
var x = 1
var z = 2----
var x = 1
var z = 2
---- later...
var x = 1
(space)
(space)
(space)
(space)
(space)var z = 2
Any ideas to fix this issue?
Thank you,
Steve -
Re: Non-breaking spaces in editor

5 December 2009 at 1:32pm
I've had this happen and I blamed our frienemy TinyMCE coupled with the HTMLText the encodes/decodes text. I wasn't able to fix it without something hacky like onBeforeWrite() changes. Although perhaps this TinyMCE setting would help?
http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/remove_trailing_nbsp
You can change settings with:
http://doc.silverstripe.org/doku.php?id=htmleditorconfig -
Re: Non-breaking spaces in editor

5 December 2009 at 5:27pm
Thank you.
I tried some of the things mentioned here http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/remove_trailing_nbsp , but nothing seemed to change.
This is mostly over my head. I really want to find a way to add a script like a paypal button script or other script without having to open the editor. Just click a button like adding an image, click on the screen where I want the form, etc. and add my code - click.
I have seen some of this talked about in the TM forums but I will need someone at some point if I really need to implement this.
Right now, either my connection is slow, of my script is causing the CMS to really crunch - just to open, or scroll.
And of course still like to see the script stop adding spaces.
-
Re: Non-breaking spaces in editor

5 December 2009 at 5:30pm
Another thought along these lines. Is there a way to add a <script> that includes my script? Like a php include in the page?
-
Re: Non-breaking spaces in editor

6 December 2009 at 7:31am
I am working on another work around. I did find that if I removed all returns in the code it is fine - just not very readable
| 722 Views | ||
|
Page:
1
|
Go to Top |



