• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Design issue  Centering interferrers with the Code BBCode

Decent60

Well-known member
#1
While I was trying to center some instructions that used the BBCode CODE feature, I noticed that the CENTER BBCode was being applied to every line, rather than overall. Since the CODE doesn't display any BBCode inside of it (which I like), this does create a mess. Shouldn't the CENTER code be only used when it's clicked on instead of like this:


making it more like this:
PHP:
[CENTER]
Testies testies
[code]
fweeee!
lalala
[/code]
[img]http://c0066373.cdn2.cloudfiles.rackspacecloud.com/zYA6yr.png[/img]
[CODE]
afalalfkjalkfjaskldfjaskldf
daslkfjasklfjalkfja
askdflslfkweis.lkjkw
alal
alueta jonte alueta[/CODE]
[/CENTER]
Which would produce this:


Testies testies
Code:
fweeee!
lalala

Code:
afalalfkjalkfjaskldfjaskldf
daslkfjasklfjalkfja
askdflslfkweis.lkjkw
alal
alueta jonte alueta
Would be a more functional and practical way of doing it.
[Edit]
As long as you are not trying to edit the post.
 

Brogan

XenForo moderator
Staff member
#2
This is a feature of the WYSIWYG editor.
Typically it will apply markup to each separate line and not as a block.
 

Decent60

Well-known member
#3
This is an odd feature for it though, as if you do set it up as a block center and then try to edit the post, it will reformat it with a center code on each line once again rather than keeping the original format.
 

Brogan

XenForo moderator
Staff member
#4
I agree it's not ideal but I don't think much can be done about it.

I tend to encounter lots of problems editing posts with code in so I tend to either rewrite them from scratch or use the plain text editor.
 

Mike

XenForo developer
Staff member
#5
This is pretty fundamentally how each browser handles WYSIWYG editing - each line gets formatting. It's possibly something we could look at in the future, but it's a massively complex topic.