Hirale
Hirale
To add a copy icon to an element, follow these steps: Add the `data-copy-text` attribute, which holds the text content to be copied. For example: ```html ) ```
I think it is more convenient to use the special attributes of html tag.
@fballiano do you mean this? js/varien/js.js ``` javascript /** * Adds copy icons to elements with the class 'copy-text'. */ function addCopyIcons() { const copyTexts = document.querySelectorAll('.copy-text'); copyTexts.forEach(copyText => {...
> when I click the copy icon on the order number I get: which browser?
on chrome Version 124.0.6367.61 and firefox 125.0.2 (64-bit), works fine 
> chrome maybe here is the reason. Should I add some checks before writeText function? https://stackoverflow.com/questions/51805395/navigator-clipboard-is-undefined https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeText https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts
I've added the `data-copy-text` attribute to the target element and styled it using a CSS class, as we discussed earlier.
https://apilayer.com/marketplace/fixer-api 
> @hirale what do you mean? that the currently used address is working fine? the current one works fine.
some third-party modules like admin action logs have something similar