emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] html export: what do codehighlighton/off functions do?


From: Manuel Koell
Subject: [O] html export: what do codehighlighton/off functions do?
Date: Thu, 12 Nov 2015 17:27:22 +0100

Can someone please tell me what these functions do?

```
function CodeHighlightOn(elem, id)
 {
   var target = document.getElementById(id);
   if(null != target) {
     elem.cacheClassElem = elem.className;
     elem.cacheClassTarget = target.className;
     target.className = "code-highlighted";
     elem.className   = "code-highlighted";
   }
 }
 function CodeHighlightOff(elem, id)
 {
   var target = document.getElementById(id);
   if(elem.cacheClassElem)
     elem.className = elem.cacheClassElem;
   if(elem.cacheClassTarget)
     target.className = elem.cacheClassTarget;
 }

```

The only thing I could think of is to toggle some classes, but I can't seem to find some real world example out there. This _javascript_ code is included on every export, doesn't matter if you've src/example blocks in your org file or not.

Thanks

reply via email to

[Prev in Thread] Current Thread [Next in Thread]