There is 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-e2189750-2da2-41a2-8870-37cf39679f02 XWIKI-22270 Open

Display links to anchors in view mode on hover

 
View issue   ·   Add comment
 

1 comment

 
cid:jira-generated-image-avatar-b170395d-a01d-4c63-aea8-a9a067465310 Petr Bodnár on 02/Jul/24 15:49
 

Hi there, what about simply using AnchorJS e.g. like this?

require.config({
  paths: {
    'AnchorJS': 'https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.3.1/anchor'
  }
});

require(['AnchorJS'], function(AnchorJS) {
  const anchors = new AnchorJS();
  anchors.add('.wikigeneratedid');
});

At the first sight, it seems to work just fine. Tested in XWiki 15.10.8.