Options

Captions Not Accepting HTML / Line Breaking

leftquarkleftquark Registered Users, Retired Mod Posts: 3,784 Many Grins
edited August 30, 2013 in SmugMug Customization
It appears that the caption section below my photos in the New SM is doing weird things:
  1. Not following the line breaks entered in the EXIF or manually entered in the caption box
  2. Not following the font HTML tag that I have set

The line breaks is killin' me though. It looks awful to have my nicely formatted captions squished into one big block.

Any way to fix this?
dGrin Afficionado
Former SmugMug Product Team
aaron AT aaronmphotography DOT com
Website: http://www.aaronmphotography.com
My SmugMug CSS Customizations website: http://www.aaronmphotography.com/Customizations

Comments

  • Options
    runswithsizzersrunswithsizzers Registered Users Posts: 13 Big grins
    edited August 7, 2013
    I'm having similar problems with some, but not all of my text. Sorry, no answers on how to get line breaks which were present on the legacy site to appear on the New site, except this: When my About Me Profile turned into one big ugly block of text, I couldn't easily add back the line breaks with HTML. Nor could I paste text copied to the clipboard. However, I was able to select the properly formatted text from my legacy site and DRAG it into the new text box and my line breaks were preserved. (Using Safari 5.1.9 on a Mac if it makes any difference.)
  • Options
    einateinat Registered Users Posts: 193 Major grins
    edited August 7, 2013
    Here's how I solved the line-breaking. It seems that it does, partially, support the html.
    For each new line I use the paragraph tag

    like this


    It's some kind of a walk-around, and I'm no html expert (I basically know how to use bold and underline...)
  • Options
    jawsnapjawsnap Registered Users Posts: 7 Beginner grinner
    edited August 9, 2013
    I'm having the same problem with the line breaks. I have a running 365 project with thousands of photos across many years, and I've been using more-or-less the same caption formatting the whole time. I can't go back and edit the photos one by one - I HAVE to have the line breaks there.
    You can also just put <br> at the end of the line. It's marginally easier than using <p> tags :)
    Here's a similar thread: http://dgrin.com/showthread.php?t=237309
    I hope this is fixed soon... I just sent a support email.
  • Options
    leftquarkleftquark Registered Users, Retired Mod Posts: 3,784 Many Grins
    edited August 28, 2013
    Bump -- I noticed SmugMug has been implementing features and posting here on the dgrin forums. Any update from SM support heroes?! Can you confirm the bug was actually submitted and it's being fixed?
    dGrin Afficionado
    Former SmugMug Product Team
    aaron AT aaronmphotography DOT com
    Website: http://www.aaronmphotography.com
    My SmugMug CSS Customizations website: http://www.aaronmphotography.com/Customizations
  • Options
    d3needshelpd3needshelp Registered Users Posts: 31 Big grins
    edited August 28, 2013
    leftquark wrote: »
    It appears that the caption section below my photos in the New SM is doing weird things:
    1. Not following the line breaks entered in the EXIF or manually entered in the caption box
    2. Not following the font HTML tag that I have set

    The line breaks is killin' me though. It looks awful to have my nicely formatted captions squished into one big block.

    Any way to fix this?


    I picked this up along the way of learning a little code:

    As far as the line break...I use a <br> everywhere in the caption field that I want the line to break. Give that a try. If you want two lines, I use <br><br> and so on. The <br> is not <html> dependent.
  • Options
    leftquarkleftquark Registered Users, Retired Mod Posts: 3,784 Many Grins
    edited August 29, 2013
    I picked this up along the way of learning a little code:

    As far as the line break...I use a <br> everywhere in the caption field that I want the line to break. Give that a try. If you want two lines, I use <br><br> and so on. The <br> is not <html> dependent.

    I have hundreds of photos with many line-breaks. There's no way I'm going through my entire site, spending hours adding <BR> tags all over. That's just rediculous. A SmugMug support hero mentioned he would file this as a bug
    dGrin Afficionado
    Former SmugMug Product Team
    aaron AT aaronmphotography DOT com
    Website: http://www.aaronmphotography.com
    My SmugMug CSS Customizations website: http://www.aaronmphotography.com/Customizations
  • Options
    d3needshelpd3needshelp Registered Users Posts: 31 Big grins
    edited August 29, 2013
    leftquark wrote: »
    I have hundreds of photos with many line-breaks. There's no way I'm going through my entire site, spending hours adding <BR> tags all over. That's just rediculous. A SmugMug support hero mentioned he would file this as a bug

    Cool!
  • Options
    thenickdudethenickdude Registered Users Posts: 1,302 Major grins
    edited August 29, 2013
    I added a multi-line caption to a photo just now, and it seems to include my linebreaks correctly in the Lightbox and under the photo in SmugMug-style galleries (in the generated HTML source, my linebreaks were converted to
    tags for me).

    I wonder if SmugMug just fixed it, or if it's only fixed for new captions and still broken for your old ones? Or maybe you guys are talking about a different place that the caption appears? (be sure to include a link to an offending page!)
  • Options
    juanherediajuanheredia Registered Users Posts: 345 Major grins
    edited August 29, 2013
    Lamah wrote: »
    I added a multi-line caption to a photo just now, and it seems to include my linebreaks correctly in the Lightbox and under the photo in SmugMug-style galleries (in the generated HTML source, my linebreaks were converted to <br> tags for me).

    I wonder if SmugMug just fixed it, or if it's only fixed for new captions and still broken for your old ones? Or maybe you guys are talking about a different place that the caption appears? (be sure to include a link to an offending page!)

    They fixed it.

    Sent from my S3 using Tapatalk 4
  • Options
    leftquarkleftquark Registered Users, Retired Mod Posts: 3,784 Many Grins
    edited August 30, 2013
    Lamah wrote: »
    I added a multi-line caption to a photo just now, and it seems to include my linebreaks correctly in the Lightbox and under the photo in SmugMug-style galleries (in the generated HTML source, my linebreaks were converted to <br> tags for me).

    I wonder if SmugMug just fixed it, or if it's only fixed for new captions and still broken for your old ones? Or maybe you guys are talking about a different place that the caption appears? (be sure to include a link to an offending page!)

    Lamah,
    It does not appear to be fixed, unfortunately. If HTML is added to the caption the <BR>'s are no longer automatically added. If I take out the HTML, my captions display properly with <BR>'s added (when it's displayed). No <BR>'s get added to my caption if I go to edit -> photo details. If I add the HTML back in, the <BR>'s no longer get added when they're displayed.

    I haven't unveiled so I can't link anything.

    Still a bug :(
    dGrin Afficionado
    Former SmugMug Product Team
    aaron AT aaronmphotography DOT com
    Website: http://www.aaronmphotography.com
    My SmugMug CSS Customizations website: http://www.aaronmphotography.com/Customizations
  • Options
    thenickdudethenickdude Registered Users Posts: 1,302 Major grins
    edited August 30, 2013
    If you use html tags, SmugMug assumes that you want to have control over the generated code, so they don't inject <br> tags for you. A lot of HTML designs would be a real pain the ass with <br>s appearing everywhere.

    What you probably want to do is to apply CSS that causes linebreaks in captions to cause linebreaks on the page:
    .sm-gallery-image-container .sm-tile-info, .sm-lightbox-caption {
      white-space: pre-wrap;
    }
    

    However, if your caption *doesn't* have any HTML in it (so SmugMug has injected <br> tags for you), you'll end up with double-spaced lines (since both mechanisms will be adding linebreaks).

    You can disable all <br> tags inside captions to prevent the double-up, with the caveat that it will also hide the <br>s you've manually entered in your captions:
    .sm-gallery-image-container .sm-tile-info br, .sm-lightbox-caption br {
      display: none;
    }
    

    Finally, you can restore the action of <br>s that you manually add to captions (if you need to use those for some reason) by marking those with a class name, like <br class="keep">, and adding this CSS:
    .sm-gallery-image-container .sm-tile-info br.keep, .sm-lightbox-caption br.keep {
      display: block;
    }
    
Sign In or Register to comment.