Not sure if it's a prefect solution, but this could easily be done:

<script type="text/javascript">
function hideNumbers()
{
   var lists = document.getElementsByTagName('ol');
   for (var i =0;i<lists.length;i++) {
       if (!lists[i].getAttribute('isphplist')) {
           continue;
       }
var lis = lists[i].getElementsByTagName('li'); for (var j =0;j<lis.length;i++) { var ns = document.createElement('div');
           ns.innerHTML  = lis[j].innerHTML;
           lis[j].parentNode.replaceChild(ns, lis[j]);
}
       var ns = document.createElement('div');
       ns.innerHTML = lists[i].innerHTML ;
lists[i].parentNode.replaceChild(ns, lists[i]); } }
</script>
Jared Williams wrote:

Jared Williams wrote:
Replacing the list, with divs and using css generated content to display the line numbers, cleans up the paste output but won't get
... and doesn't work in IE. So no real win here. The semantic solution would be to use ol/li .

Can't use ol/li thou, as that is what messes up the cut & paste in FF. Even if 
you use conditional CSS, set the list-style to none,
and use css generated content to inject the line numbers, when it cut & pastes, 
FF forgets the list-style none, and still includes
junk.

Jared


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to