Design issue  Centering interferrers with the Code BBCode

Decent60

Well-known member
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:
zYA6yr.png


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
zYA6yr.png

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.
 
This is a feature of the WYSIWYG editor.
Typically it will apply markup to each separate line and not as a block.
 
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.
 
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.
 
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.
 
Top Bottom