Not planned Preserve user-inserted spaces in the editor

jauburn

Well-known member
Poets need a forum editor that preserves user-inserted spaces because the formatting of poetry is often essential to its meaning. So far in the forum software world I have found very few packages that include an editor that preserves user-inserted spaces. Simple Machines is one. However, I much prefer the more robust forum packages in most other respects, and for my longstanding poetry forum for serious writers, I would love to adopt Xenforo. But I can't because, like the editor in vbulletin and many other forum software packages, the editor in xenforo strips all user-inserted spaces when a post is saved.

Is there any hope that xenforo may be in the future for my forum?

Thank you.
 
Upvote 3
This suggestion has been closed. Votes are no longer accepted.
The editor doesn't strip spaces. HTML strips spaces. You could use the indent tag or code tags to accomplish preserved spacing.
 
I have always found this an annoying aspect of forum editors. Especially the stripping of tabs. If you paste a perfectly columned text into a forum post and you get a jumbled mess. It would be nice to get rid of this issue.
 
The editor doesn't strip spaces. HTML strips spaces. You could use the indent tag or code tags to accomplish preserved spacing.

Sorry, unhelpful response. I don't need a tutorial in HTML. I laid out the situation clearly. There are some forum editors that do not do what HTML does: strip user-defined spaces. See the free Simple Machines SMF forum editor, for example (there are others). I'm asking Xenforo to adopt (or allow as an option) an editor that also does not strip user-defined spaces, as HTML does.
 
My response was correct, XenForo's editor doesn't strip spaces. Since you quoted me, you would have noticed that the spaces are there. You are looking for XenForo to convert spaces to preserve formatting (for more than one space to appear in HTML you need to use the   character, which, I'm sure is what SMF does). This can be accomplished through add-ons if you so desire.
 
I do not believe there is an add-on that does what you want, but I can think of several different methods of accomplishing this via add-ons rather easily. Actually, if you add a BBCode (this requires an add-on, look into my resources) that uses a PHP Callback to convert spaces upon rendering, that could be an easy interim solution.
 
I do not believe there is an add-on that does what you want, but I can think of several different methods of accomplishing this via add-ons rather easily. Actually, if you add a BBCode (this requires an add-on, look into my resources) that uses a PHP Callback to convert spaces upon rendering, that could be an easy interim solution.

Please stop wasting the time of people who are interested in this issue. You clearly implied, after your first unhelpful response, that there were add-ons that could address this issue. If you don't have a solution to the problem at hand, just move on, please.
 
That is an unnecessarily rude post.

Considering the editor has just been changed and the software is still in beta, you would be better off having a custom add-on developed.

You are unlikely to get what you want in the medium term at least.
 
That is an unnecessarily rude post.

I do not agree. Invariably when someone posts a well-researched request, there are those who chime in with responses that suggest that you have not researched the issue well. I have. I supplied evidence of the research I have conducted. Just look at the embedded editor in SMF. It does what I am requesting. There are others as well. However, these forum software packages are not as user-friendly in other areas as xenforo or vbulletin. I was asking that the editor in xenforo allow user-inserted spaces for a very specific reason. No poetry forum could possibly adopt xenforo or vbulletin in their current incarnation because the included editors do not retain user formatting.

I don't think it's unreasonable of me to be perturbed by the inevitable (perhaps rude) responses that suggest that the issue is not with xenforo when other forum software packages include an editor that does what I'm requesting.
 
The solution for anyone that is looking for this is that an add-on is required. I have given this answer to plenty of people for plenty of reasons, but it does not mean one has been created. If you read my post, its mostly possible (with a little work) with one of my add-ons. If you feel that I am wasting your time, I will stop responding. If anyone else would like help implementing this using BBCM, please post in the BBCM thread and I will more than gladly help you.
 
Last edited:
Brogan, I'd like to suggest an enhancement to the redactor editor implementation of xenforo, so that spaces and tabs are not removed. Should I open a new suggestion thread? This one requests replacement of the editor. I would like to request enhancement of the editor.
 
We need to know whether this suggestion is requesting a new editor or a change to the existing one.

Once the thread author has responded, feel free to make a new suggestion if the latter case isn't covered.
 
It's not so much the editor - the editor preserves the space. The output doesn't (as we don't allow non-breaking spaces and we don't translate spaces otherwise).

Annoyingly, I don't see a CSS white-space setting that preserves spaces but doesn't collapse line breaks (which would likely allow this to work with just a CSS change).
 
We need to know whether this suggestion is requesting a new editor or a change to the existing one.

No idea. The answer to that is beyond my technical ability. I'm just looking for an end result. Whether that can be obtained by modifying the current editor or by some other means makes no difference to me.

All I know is that the editor in SMF and a couple of other forum software packages that I tried through the softalicious package installer on my dedicated server do what I'm requesting. How they do it I don't know, but I would imagine one or more of the developers around here would know.
 
I have learned that the SMF editor does this:

The SMF editor preserves spaces by changing every other blank into a non-breaking space &nbsp ;. That prevents HTML from collapsing runs of spaces into single blanks. It's not really part of the "editor" -- SMF just uses a <textarea>. It's in the post-processing of what comes out of the <textarea> that's the difference -- whoever wrote that code decided to preserve extra spaces, apparently figuring that if you put in multiple spaces, that you must have done so for a reason.

http://www.simplemachines.org/community/index.php?topic=509311.msg3591207#msg3591207
 
Top Bottom