Lines Matching refs:diagrams
2 * Attach editing button to media file diagrams in pages
6 // get all diagrams images and their IDs
7 const diagrams = document.querySelectorAll('object.diagrams-svg[data-id]');
8 const diagramIDs = Array.from(diagrams).map(image => image.getAttribute('data-id'));
10 // check which of the found diagrams are editable
12 body.set('diagrams', JSON.stringify(diagramIDs));
20 // add edit button to editable diagrams
21 diagrams.forEach(image => {
24 button.className = 'diagrams-btn';
25 button.innerText = LANG.plugins.diagrams.editButtonShort;
26 button.title = LANG.plugins.diagrams.editButton;
39 image.parentNode.querySelector('.diagrams-buttons').appendChild(button);