Open GoogleCodeExporter opened 8 years ago
Yeah I don't like that either =/
Original comment by envygeeks
on 24 Apr 2008 at 5:49
I can't get to site mentioned by bachelderd, but here's a fix I used. Just
change
shCore.js dp.sh.Toolbar.Commands to start like this:
dp.sh.Toolbar.Commands = {
ExpandSource: {
label: '+ show source',
//check: function(highlighter) { return highlighter.collapse; },
func: function(sender, highlighter)
{
//sender.parentNode.removeChild(sender);
if(highlighter.div.className.indexOf('collapsed') != -1){
highlighter.div.className = highlighter.div.className.replace('collapsed', '');
sender.innerHTML = '- hide source';
}
else{
highlighter.div.className += ' collapsed';
sender.innerHTML = '- show source';
}
}
},
// opens a new windows and puts the original unformatted source code inside.
ViewSource: {
Original comment by JoeCoval...@gmail.com
on 7 Dec 2008 at 1:55
sorry about that... I think the URL changed at some point... it's:
http://blog.codesushi.com/codesushi/entry/js_syntax_highlighter
Original comment by bacheld...@gmail.com
on 7 Dec 2008 at 2:01
Thanks, bachelderd. Turns out my way above only works if you start with the
source
collapsed. I fixed that and came back and saw your new URL. Maybe your way is
better, but for the record, here's what I'm using at the second:
ExpandSource: {
label: '+ show source',
check: function(highlighter) {
if(!highlighter.collapse)
dp.sh.Toolbar.Commands.ExpandSource.label = '- hide source';
return true;
},
func: function(sender, highlighter)
{
//sender.parentNode.removeChild(sender);
if(highlighter.div.className.indexOf('collapsed') != -1){
highlighter.div.className =
highlighter.div.className.replace('collapsed', '');
sender.innerHTML = '- hide source';
}
else{
highlighter.div.className += ' collapsed';
sender.innerHTML = '+ show source';
}
}
},
Original comment by JoeCoval...@gmail.com
on 8 Dec 2008 at 12:15
Get advanced Free php script on
http://getphpscript.blogspot.in/
Original comment by kumarg...@gmail.com
on 6 Nov 2013 at 6:04
Original issue reported on code.google.com by
bacheld...@gmail.com
on 23 Mar 2008 at 10:56