Format rendering of links to (local) pdf files?

As far as I know oneboxing will only work on externally linked PDFs, not uploaded ones.

With CSS you could do something like

a.attachment[href$=".pdf"] {
    color: red;
    &:before {
      // The attachment icon is added using a pseudo-selector 
     // so you'd need to edit its styles here
    }
}

This applies styles to links with the class attachment only if the href ends in .pdf

11 Likes