BBCodes on PF: Solve Issues & Make Requests

  • Thread starter Thread starter lpetrich
  • Start date Start date
AI Thread Summary
The discussion revolves around issues with BBCodes for superscript and subscript formatting, which are not functioning as intended due to CSS styling conflicts. Users have noted that while the text appears smaller, it does not align correctly as raised or lowered. There are requests for additional BBCodes, including a "wiki" BBCode and a "table" BBCode, which could enhance post formatting. Testing revealed that the CSS properties may be affecting the functionality of the <sup> and <sub> tags, with suggestions to define them explicitly for better results. Overall, the conversation highlights the need for improved BBCodes to facilitate better text formatting on the platform.
lpetrich
Science Advisor
Messages
998
Reaction score
180
These are codes for creating markup in your posts.

I've tried "sup" (superscript) and "sub" (subscript), and they make the text smaller but not raised or lowered:
x2 x2 x2

Would it be OK to have a Wikipedia "wiki" BBCode?

I've also noticed a lack of a "noparse" BBCode.

Any problems with BBCodes? Any requests?
 
Physics news on Phys.org
Thanks for reminding me. I need to convert a lot of old bbcode.

4324 12343
 
Last edited:
I did some testing it's completely bizarre. The source code look fine. I even tried different fonts and they all won't work. Perhaps there is some styling that is keeping everything in line.
 
I think
Code:
vertical-align: baseline;
is a culprit.
 
  • Like
Likes Greg Bernhardt
Seems like a problem with the CSS code for HTML tags <sup> and <sub>, which is what "sup" and "sub" get turned into. I tried both tags in a HTML sandbox site, and they worked properly.

I have another request. A "table" BBCode. Given what we often discuss here, it would be valuable, but one was never installed in the vB3 version of this site. vB4 has BBCode tables built in, but its BBCodes for tables closely parallel the HTML tags for tables: table overall, tr for rows, td and th for cells. So one could do tables that way.
 
  • Like
Likes Greg Bernhardt
lpetrich said:
I have another request. A "table" BBCode.

Good suggestion

Borek said:
is a culprit.

That makes some sense, but I don't see that being used for the message text styling. Do you see it?
 
Greg Bernhardt said:
Do you see it?

In Opera Dragonfly it is listed as style of these characters, if I understand the situation correctly it is taken from the css.php file. Switching it (locally) off makes the subscript to drop below the baseline, see these two screenshots:

Untitled-1.png


Untitled-2.png
 
  • Like
Likes TumblingDice and Greg Bernhardt
Strange that the sub and sup have properties. They must be inheriting them somehow. Anyway, I've explicitly defined them and they work. Nice job @Borek ! I'll make editor buttons for them later today.
 

Similar threads

Replies
183
Views
79K
Replies
3
Views
2K
Replies
8
Views
2K
Replies
18
Views
3K
Replies
24
Views
3K
Back
Top