Okay
  Public Ticket #3546733
formatting cells
Closed

Comments

  • Alison Watson Maston started the conversation

    Webpage: https://simsburyfreelibrary.org/resources/collection-finding-aids/amos-r-eno/

    Media file: Finding Aid Web – Amos R. Eno PROOFED_LOADED Dec 6 2022

    Row 7 (There are many other examples.) - Column K has multiple line breaks that are not maintained in the display.

    I cannot find anything addressing this in the tickets or articles and the FAQ page just doesn't load at all. Is there a way to maintain this formatting? 

    Attached files:  Finding-Aid-Web-–-Amos-R.-Eno-PROOFED_LOADED-Dec-6-2022 (1).xlsx

  •  2,572
    Aleksandar replied

    Hello Alison

    Regrettably, presently, we lack a straightforward solution for conveying new lines or line breaks when linking a table to a source Spreadsheet/CSV/Excel. Any formatting applied to the source cannot be transferred to the table through this method.

    Adding HTML <br> tag in the source sheet cells can do the trick.

    1465539891.png
    3633558667.png

    The only alternative workaround involves utilizing Conditional Formatting, although it is a more intricate solution.

    Here's a method for creating values in cells that span multiple lines without the need for <br> tags:

    If you structure cell values as demonstrated in this example:

    4782946091.png

    And then, if you make conditional rules, like this :

    2919094666.png

    This prompts the plugin to examine each cell value for the specified content as we articulate them. If a match is found, the plugin will incorporate <br> to facilitate a new line within the table cells. The outcome is as follows:

    3533615901.png

    This workaround enables filter values in the select box without <br> tags and allows column cells in the table to span multiple lines. However, its effectiveness depends on the nature of the content added to the source sheet by those editing it.

    While suitable for a limited set of values, it becomes less practical for extensive text requiring numerous new lines. In such cases, the Conditional Rules workaround proves more challenging than manually inputting <br> tags.

    Regrettably, at present, this represents the optimal solution for creating new lines in linked tables, as no better or simpler alternatives are available.

    If you want to try a completely different approach, you can try to import the initial data ( from CSV/Excel/Google Sheet) to make a new Manual Table, or make a new Manual Table from scratch, and use a 'multi-line String' Column with a 'multi-line Editor' input type.

    ( * Important note, if you do that, the table loses the connection with the source Sheet/file, so any editing you make on the source will not reflect the table, but it is fully editable in our plugin)

    Subsequently, you can embed this table on a front-end page, providing users with the capability for front-end editing. It functions as a multi-line editor, enabling users to create new lines effortlessly by pressing "Shift+Enter," eliminating the need for <br> tags.

    8853134963.png
    3260314598.png

    You can also limit Editing to only specific user roles on your WordPress, in the table Editing tab/Editing roles.

    2258889235.png


    Currently, these are the available methods I can think of. If you have any suggestions for future improvements, please don't hesitate to explore and share your ideas on our suggestions page.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    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