pmichaelis Posted May 6, 2022 Share Posted May 6, 2022 Hey everybody, I just uploaded a small textformatter module for wrapping tables with a div container in order to display responsive HTML tables in the frontend. TextformatterWrapTable Processwire wrap table module is a textformatter module for processwire CMS/CMF. It is wrapping markup tables with a div container. wrapping tables with div container simplifies the process of displaying responsive tables in the frontend. The css classes for the wrapper and the table are configurable. .table-responsive / .table by default the module produces the following markup: <div class="table-responsive"> <table class="table"> ... </table> </div> Link to Repositoryhttps://github.com/pmichaelis/TextformatterWrapTable 8 2 Link to comment Share on other sites More sharing options...
bernhard Posted September 28, 2022 Share Posted September 28, 2022 Hey @pmichaelis thx for the module. I've had some weird issues on my current project and tracked it down to the textformatter. Turned out that your module turned this: <p>xxx</p> Into that: <html><body><p>xxx</p></body></html> This is the fix that works for me: https://stackoverflow.com/a/22490902/6370411 I'll comment that on github if you want to fix this ? I don't think that the textformatter should add <html> and <body> to the markup, or was that intended? 2 Link to comment Share on other sites More sharing options...
pmichaelis Posted September 28, 2022 Author Share Posted September 28, 2022 Hey Bernhard, Weird! thanks for bug-reporting. I'll update the repository! 2 Link to comment Share on other sites More sharing options...
torf Posted December 31, 2022 Share Posted December 31, 2022 That's a very handy module. Thanks a lot. Where I got a bit into trouble is adding multiple classes to a table, as it keeps replacing every space with an "-" and makes it therefore impossible to add multiple classes (like for instance "table table-striped" gets saved as "table-table-striped". I suppose that's the sanitizer function. Have you got any idea for a workaround? Link to comment Share on other sites More sharing options...
pmichaelis Posted January 2, 2023 Author Share Posted January 2, 2023 On 12/31/2022 at 6:20 AM, torf said: That's a very handy module. Thanks a lot. Where I got a bit into trouble is adding multiple classes to a table, as it keeps replacing every space with an "-" and makes it therefore impossible to add multiple classes (like for instance "table table-striped" gets saved as "table-table-striped". I suppose that's the sanitizer function. Have you got any idea for a workaround? Hello @torf, I pushed an update a minute ago. Please have a look, if the issue is resolved. Happy new year. 1 Link to comment Share on other sites More sharing options...
torf Posted January 5, 2023 Share Posted January 5, 2023 Works like a charm. Thank you very much. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now