Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    I’m not really sure about that problem with the “”. That might be caused by your Kompozer program not properly showing the table as UTF-8. As it’s basically nowhere stated that the table is saved as UTF-8 (it’s the plain table HTML, without a <meta> tag that contains the charset which we would see in a regular web page).

    For the line breaks: That’s kind of expected here. Line breaks in table cells are exported as-is, but technically, they don’t have a meaning. They only get a meaning when displayed through the [table] Shortcode as TablePress then automatically converts them to HTML <br /> tags – which are responsible for the actual visible line break.

    Therefore, your best fix here should be to not use the “Export” feature in TablePress for this, but to save the page that contains the table Shortcode as an HTML page. You would then simply have to remove all other (unwanted) HTML code from between the <body> tag. This way, you would have a table with line breaks. The second advantage would be that Kompozer should understand that it should interpret the table as UTF-8.

    Regards,
    Tobias

    Thread Starter joshgaines

    (@joshgaines)

    Would asking for line breaks that are reflected in the tablepress editor (as opposed to the table as displayed via the shortcode) to be embedded in html exports be a reasonable feature request? It seems like there wouldn’t be a problem with the exported html document reflecting the breaks that are present in cells in the editor, since those are will always be intentional.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    sorry, that won’t really work, I’m afraid as the HTML files would then no longer be re-importable without causing double line breaks.

    Regards,
    Tobias

    Thread Starter joshgaines

    (@joshgaines)

    Thanks.

    So when I save the html from the page that displays the table, I get linebreaks in the html document that mirror the line breaks displayed on the page (where the lines break automatically to accommodate the width of the cell) — breaks in the html text, not breaks specified by
    .

    If I change a few things on the saved html document and then re-import, those line breaks in the text are then converted to
    breaks by tablepress. As a result, there are lots of undesired line breaks when the table is viewed on the site.

    So, is there anything I can change that would prevent the html import converter from inserting
    tags in place of carriage returns? It seems logical to expect that everything in an html table would wrap unless there was a
    , regardless how the text breaks in the html document.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    what you describe basically is the reason why “graphically” editing HTML tables is not really nice.

    One idea could be to turn off the automatic conversion of line breaks in the table to HTML <br /> tags, by adding another parameter to the Shortcode:

    [table id=123 convert_line_breaks=false /]

    You’d basically need to add this after re-importing your modified table. After that, only actual <br /> tags will cause a visual line break.

    Regards,
    Tobias

    Thread Starter joshgaines

    (@joshgaines)

    That is exactly what I was looking for. Works perfectly. Thanks again!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    Best wishes,
    Tobias

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Line breaks not preserved on html export – encoding problems on export’ is closed to new replies.