##// END OF EJS Templates
add anchor and link to heading cells
MinRK -
Show More
@@ -934,6 +934,7 b' pre,code,kbd,samp{white-space:pre-wrap;}'
934 .js-error{color:darkred;}
934 .js-error{color:darkred;}
935 a{text-decoration:underline;}
935 a{text-decoration:underline;}
936 p{margin-bottom:0;}
936 p{margin-bottom:0;}
937 a.heading-link:link{text-decoration:none;color:inherit;}
937 @media print{body{overflow:visible !important;} div#notebook{overflow:visible !important;} .ui-widget-content{border:0px;} #save_widget{margin:0px !important;} #header,#pager,#pager_splitter,#menubar,#toolbar{display:none !important;} .cell{border:none !important;} .toolbar{display:none;}}.rendered_html{color:black;}.rendered_html em{font-style:italic;}
938 @media print{body{overflow:visible !important;} div#notebook{overflow:visible !important;} .ui-widget-content{border:0px;} #save_widget{margin:0px !important;} #header,#pager,#pager_splitter,#menubar,#toolbar{display:none !important;} .cell{border:none !important;} .toolbar{display:none;}}.rendered_html{color:black;}.rendered_html em{font-style:italic;}
938 .rendered_html strong{font-weight:bold;}
939 .rendered_html strong{font-weight:bold;}
939 .rendered_html u{text-decoration:underline;}
940 .rendered_html u{text-decoration:underline;}
@@ -516,7 +516,16 b' var IPython = (function (IPython) {'
516 HeadingCell.prototype.set_rendered = function (text) {
516 HeadingCell.prototype.set_rendered = function (text) {
517 var r = this.element.find("div.text_cell_render");
517 var r = this.element.find("div.text_cell_render");
518 r.empty();
518 r.empty();
519 r.append($('<h'+this.level+'/>').html(text));
519 r.append(
520 $('<a/>')
521 .addClass('heading-link')
522 .attr('href', '#' + text)
523 .attr('name', text)
524 .append(
525 $('<h'+this.level+'/>')
526 .html(text)
527 )
528 );
520 };
529 };
521
530
522
531
@@ -468,3 +468,8 b' p {'
468 margin-bottom:0;
468 margin-bottom:0;
469
469
470 }
470 }
471
472 a.heading-link:link {
473 text-decoration: none;
474 color: inherit;
475 }
General Comments 0
You need to be logged in to leave comments. Login now