diff --git a/DESCRIPTION b/DESCRIPTION index 57d0b88c..7dc92a13 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: flextable Title: Functions for Tabular Reporting -Version: 0.9.7.011 +Version: 0.9.7.012 Authors@R: c( person("David", "Gohel", , "david.gohel@ardata.fr", role = c("aut", "cre")), person("ArData", role = "cph"), diff --git a/inst/web_1.1.3/tabwid.js b/inst/web_1.1.3/tabwid.js index 47070f7b..ae8358fc 100644 --- a/inst/web_1.1.3/tabwid.js +++ b/inst/web_1.1.3/tabwid.js @@ -16,5 +16,16 @@ document.addEventListener("DOMContentLoaded", function(event) { fantome.appendChild(tabwid_link.cloneNode(true)); } }); -}); + const shadowHosts = document.querySelectorAll('.flextable-shadow-host'); + shadowHosts.forEach(host => { + if (host.shadowRoot) { + const spanElements = host.shadowRoot.querySelector('div > table > caption > span[id]'); + if (spanElements) { + const id = spanElements.getAttribute("id"); + host.setAttribute("id", id); + } + } + }); + +});