Hi,
I’m not really sure what you mean with “button to the table editor”, but from what I think you mean, this is indeed possible through an extension.
There are quite a few plugin filter hooks that you can use inside a small plugin to add content to the “Edit” page of a table. For a list please see the documentation, or better take a peak into the source code, near the relevant lines of code that create the “Edit” page.
By using this mechanism, you won’t lose your buttons with an upgrade, as they basically are a custom plugin.
Best wishes,
Tobias
Hi,
Yes, I mean the buttons you see on the table edit page. Currently there are “Insert link” and “Insert image” ones but I need to add a couple more which would insert a code to table cells.
Hi,
thanks for the clarification.
Unfortunately, there are no plugin filter hooks in that location, so you won’t really be able to use my suggestion from above that easily here.
So, a better solution might be to simply use some JavaScript, that you load in the admin footer. You will need JavaScript anyways, to add something to the textfields, so you can as well use it to add the button when the page is loaded.
Regards,
Tobias
Thanks for the tip, Tobias! Guess something like $(".wp-table-reloaded-data-manipulation tr :first").append("code for new buttons"); would work fine for this purpose.
Hi,
yes, exactly. That should allow you to add a new row to the table with all the buttons in it.
For the actual functionality of adding something to a table cell, I suggest that you take a look into the existing code of the “Insert Link” JavaScript code (admin-script.dev.js).
Best wishes,
Tobias