Support » Plugin: TablePress » How to wrap tablepress shortcode output in a div

  • Resolved delerean



    Id like to be able to automatically wrap the entire tablepress shortcode output in a div.

    The plugin outputs the shortcode in 3 different elements: name, table and description. Each of these elements have a filter added in class-render.php where I can wrap them one by one, but I see no filter or a “how to” in the code/docs to wrap the 3 elements in a single div.

    I know I can simply do a <div>[tablepress]</div> in the content, but I got +400 tables already inserted in my pages and that job would be just crazy, there must be another way.

    On the other hand, I think a filter like this one I ask for is a must for developers.

    In the meantime, if you can please tell me how to accomplish this task Id really appreciate your help.

    If you ask why I need to do this, it’s because I got a feature to export in PDF those posts containing the tables, and I need to wrap the entire output in a div to be able to style it with page-break-inside:avoid. This way the name, table and description will remain in the same page without splitting them.

    Thanks for your help in advance and for developing this great plugin 🙂

    • This topic was modified 3 years, 3 months ago by delerean.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to wrap tablepress shortcode output in a div’ is closed to new replies.