WordPress.org

Ready to get started?Download WordPress

Forums

TablePress
[resolved] Insert Link and Insert Image in one Cell (6 posts)

  1. matthias1945
    Member
    Posted 1 year ago #

  2. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    thanks for your question.

    The trick here is the combination of the HTML code.
    By default, WordPress will add a link to an image that is inserted automatically, so that the image opens in a new window, when it is clicked.
    To prevent this, and have the link go to a specific URL, you will need to make a small change when inserting the image from the Media Library. So, when selecting the image from the Media Library, and before clicking the button "Insert into Post", you will see a field "Link URL". That is where you have to enter the desired URL for the link.

    The other solution would be to simply replace the wrong URL with the correct one in the HTML code in the cell. The "Advanced editor" can indeed be helpful with that, as it shows the cell content in a bigger textfield.

    Regards,
    Tobias

  3. matthias1945
    Member
    Posted 1 year ago #

    Dear TbobiasBg
    At first: thank you very much for your immediate response and your perfect solution.
    At second, please excuse me for my fpr my very late response.
    I changend the necessary codes in the "Advances editor" and now all links are correct, as you see in
    http://chcb.schlaepfer.com/
    Thank you very much for your effort.

    Unfortunately there are unwanted margins and paddings between the cells and rows, so that the images appeaers not in one compact block.
    I tryed to set all targed values to zero in the CUSTOM CSS textarea in the Plugin options (see subjaent, but without any effect to eliminate the gaps. What I had do wrong ?

    .tablepress-id-1,
    .tablepress-id-1 tr,
    .tablepress-id-1 tbody td,
    .tablepress-id-1 thead th,
    .tablepress-id-1 tfoot th {
    padding: 0;
    border: 0;
    margin: 0 0 0 0;
    }

    Thank you very much for a the right solution.

    Best Regards

    Maatthias

  4. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Matthias,

    nice to hear that inserting the images worked!

    To reduce that white space even more, you'll have to extend the "Custom CSS" with some code for the images, and one more property for the cells:

    .tablepress-id-1,
    .tablepress-id-1 tr,
    .tablepress-id-1 tbody td,
    .tablepress-id-1 thead th,
    .tablepress-id-1 tfoot th {
      line-height:0;
      padding:0;
      border:0;
      margin:0;
    }
    .tablepress-id-1 img {
      max-width:none;
      box-shadow:none;
      padding:0;
      border:0;
      margin:0;
    }

    You will then still see small white margins around the images (not all of them), but those are already in the images (some Gaussian filter on the edges, I assume). You will have to remove those in the graphics themselves.

    Regards,
    Tobias

  5. matthias1945
    Member
    Posted 1 year ago #

    Hi TobiasBg
    Vour are great !
    Thank you very much for your special efforts; i have inserted your codes and the result ist superb. The small white lines in the images are really in the images, because i would see, what's for a result is this giving. This project is planed to do it and if can really realised this webpage i will you donate for your effort.
    It's very enjoy to work together with you.

  6. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Matthias,

    great to hear that this code helped! :-)

    And thanks for wanting to donate, I really appreciate it!

    Best wishes,
    Tobias

    P.S.: In case you haven't, please rate TablePress here in the plugin directory. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic