Awaiting Feedback Justified and Paragraph BBcode

Discussion in 'Feedback & Assistance' started by Technic☆Kitty, Feb 14, 2015.

  1. Technic☆Kitty Hmm

    Joined:
    Apr 2, 2010
    Gender:
    Male
    Location:
    Indiana, USA
    1,299
    This is something I've already noticed elsewhere, in regards to the paragraph and justified bbcodes. They don't exactly play well together. For instance, in a multiple paragraph thread, you can't just wrap justified bbcodes around them all. In a recent thread I had to use paragraph and justified bbcodes to wrap each individual paragraph, paragraph first and then justified, to get it to work properly. Personally, I like my important stuff to have an ident and be justified. I really wish this would be a built in feature for the editor *cough* XenForo *cough* but sometimes you have to make due.

    I'd like to request a new bbcode be added for both paragraph and justified at the same time. It'd be something like 'jparagraph' tags, the name doesn't matter. I'd get a lot of use out of it in formatting and it would be a lot less strain to use, simply wrapping it around each paragraph. HTML replacement would simply combine paragraph and justified styling.


    -Nights
     
  2. Misty gimme kiss

    Joined:
    Sep 25, 2006
    Gender:
    Cisgender Female
    Location:
    alderaan
    6,590
    The reason you're having trouble with the two codes is that the justify bbcode parses to a paragraph HTML code, which then uses the align attribute. Wrapping both a paragraph and a justify bbcode around text would be like wrapping two p tags around text in HTML; you're going to run into issues.

    The align property is deprecated in HTML5 and therefore we do need to update our code to simply use CSS; I've said it a few times before but a lot of our custom bbcodes are old and a bit janky. Obviously it's low priority but I need to comb through and update many of them to better comply and utilize new standards. When I do, the new justify tag may serve you better, but I can't say how well it will work with the paragraph bbcode, and we can't exactly create new bbcodes for every combination that people want.

    Either way i'm on my phone rn and I won't be changing anything but I'll get to it eventually.
     
  3. Technic☆Kitty Hmm

    Joined:
    Apr 2, 2010
    Gender:
    Male
    Location:
    Indiana, USA
    1,299
    I completely understand. I just thought it would be a good idea.

    After wracking my brain, I've come to the conclusion that using 'p' tags for both justify and paragraph bbcodes, and be easy to use, is impossible, or I've just not figured it out yet. I did, however, figure out a way to use the 'span' tag with the 'pre-wrap' white-space css to allow the justified text bbcode and maintain white-spaces. You'd have to press the spacebar five times every paragraph but it also only required the bbcodes to be wrapped once around the entire message. If the tab key worked in the editor it would be perfect.

    ~Nights
     
  4. Misty gimme kiss

    Joined:
    Sep 25, 2006
    Gender:
    Cisgender Female
    Location:
    alderaan
    6,590
    This is off-topic but if you're looking to indent the first line of a block of text, there's a CSS property for it. Pretty sure it's text-indent. Not sure how it plays with justified text but I don't see why it wouldn't.
     
  5. Technic☆Kitty Hmm

    Joined:
    Apr 2, 2010
    Gender:
    Male
    Location:
    Indiana, USA
    1,299
    That's what I typically use but I can't figure out a way to use it and justify as separate bbcodes without being a pain. I tried using 'p', 'body', 'span', custom classes, but it never wanted to work right. I prefer about 50px using text-indent but using the white-space CSS to keep white spaces is the closest I've come to being functional and manageable.

    -Nights