Okay
  Public Ticket #3550578
line breaks in imported spreadsheet
Closed

Comments

  • Will Mansell started the conversation

    If a spreadsheet has string data with line breaks in a cell, is it possible to retain those line breaks with a linked table to that spreadsheet?

  •  1,846
    Miloš replied

    Hello,

    I will explain how adding new lines in our plugin can be done with the current capabilities.

    For a table linked with a live Google sheet, you would need to add a HTML tag for line break as <br> anywhere you need the new lines.

    I know that is not ideal.

    We will elaborate more details how our plugin renders line breaks and possible ways to do it.

    -

    1. If you have an editable table and use a 'multi-line String' column with a 'multi-line Editor' input type.

    So, if this is a Manual table, or Imported table from a file,  during table generation you will be able to choose for each column which type it will be.

    8853134963.png

    If you set the column from the start as a "multi-line String" , it gets saved in your database as "TEXT";

    then you can use 'multi-line Editor',

     and with combination of "shift+ENTER" you will be able to make new lines like that, 

    without the need for <br> HTML tags.

    ( If you already made the column as one-line string, you can go do the database, find this table and change the column type from VARCHAR to TEXT,  which is a multi-line string).

    1901578003.png

    -

    2.  Another way can be to use a "HTML Editor" , and there you can just press "Enter" for new lines.

    In HTML Editor you can just press "Enter" and it makes new lines, while in the background code it creates HTML markup, with paragraphs.

    6668406850.png
    8563179518.png
    6632989961.png

    3. And finally, if you use Simple Tables, there you can use HTML Editor as well, for making new lines with "Enter", 

    and it adds custom HTML in the cell, but it renders only the text in the cell.

    6322744217.png

    7382717529.png

    1068235837.png

    At the moment those are the only ways, but if you have any development suggestion or feedback to improve this,

    You can suggest it to our developers, - they will do their best to make a solution in the future.

    Please feel free to search on our suggestions page

     to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there,  and as more people vote, the feature will move higher on the priority list.

    You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;

    and our newsletter, so you're informed about new features, bug fixes, freebies, etc.

    -

    If you have coding skills and wish to try to make a custom solution now,

    you can check out our available hooks for Developers on this documentation and see if you can find any hook that might help.

    Please be advised that custom solutions with hooks are not included in our support.

    You can also research resources such as Stack Overflow to see if any other user perhaps found a workaround.

    ( We do like to give examples for certain solutions, but for this use-case, we, unfortunately, don't have anything yet)

    Let me know if you have any additional questions.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables