Expand clickable area of Webhelp tile
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 55
- Joined: Tue Mar 13, 2018 6:07 pm
Expand clickable area of Webhelp tile
Post by steinbacherGE »
Is there a way to expand the clickable area of a webhelp tile? For usability, it would be nice if the whole tile (green) was clickable and not just the title text (red).
How to increase the clickable area of a <a> tag button?
https://stackoverflow.com/questions/110 ... tag-button
Is there a way to make this work so that the entire tile area is clickable? Can this also take into account the responsive sizing of the tile?
tile.png
I found this answer here, but the values don't match the entire tile area.How to increase the clickable area of a <a> tag button?
https://stackoverflow.com/questions/110 ... tag-button
Code: Select all
a {
display: inline-block;
position: relative;
z-index: 1;
padding: 2em;
margin: -2em;
}
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 275
- Joined: Thu Dec 24, 2009 11:21 am
Re: Expand clickable area of Webhelp tile
Hello,
You can achieve this behavior by contributing a custom JavaScript that registers a 'click' event handler on each tile that opens the associated link.
The procedure is described in our User Manual:https://www.oxygenxml.com/doc/versions/ ... -html.html
The JS snippet may look like the one below:
I have created a sample Publishing Template containing the above customization. It is available here: https://github.com/oxygenxml/oxygen-pub ... k-on-tiles
Rgeards,
Alin
You can achieve this behavior by contributing a custom JavaScript that registers a 'click' event handler on each tile that opens the associated link.
The procedure is described in our User Manual:https://www.oxygenxml.com/doc/versions/ ... -html.html
The JS snippet may look like the one below:
Code: Select all
const list = document.querySelectorAll('.wh_tile');
Array.prototype.forEach.call(list, function (tile) {
tile.addEventListener('click', event => {
tile.querySelector('a').click();
});
});
Rgeards,
Alin
Alin Balasa
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 55
- Joined: Tue Mar 13, 2018 6:07 pm
Re: Expand clickable area of Webhelp tile
Post by steinbacherGE »
Thanks for the sample publishing template. It works great!


Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service