Html5Copy custom dt-button-info possible?

Html5Copy custom dt-button-info possible?

innercitydkinnercitydk Posts: 1Questions: 1Answers: 0
edited March 2021 in Free community support

Link to test case: Not needed, press the Html5 copy button and look at the message that pops up
Description of problem: Hi, I would love to replace the message div that pops up on the screen when using Html5Copy button. Ultimately I would like to use a Toast, but styling of the html would also be as good (almost). I can't seem to find out how. I have tried to use CSS to target the background, but then the message div has no backgroud at all (when using scss variables).

Anyone know how to completely redo the message div that appears when copying, or better yet use a Toast ie. sweetalert or similar?

Best regards.

Answers

  • allanallan Posts: 55,815Questions: 1Answers: 8,815 Site admin

    Hi,

    There isn't a way to replace the popover with that from another library at this time I'm afraid - I think you are the first to ask for that, but its a nice idea to be able to provide that abstraction. Thanks for the suggestion.

    The copy button uses the buttons.info() method to display the popover info message.

    You can indeed use CSS to style the Buttons popover if you want - div.dt-button-info is the base selector to use - http://live.datatables.net/sufazodo/1/edit .

    Allan

This discussion has been closed.