Skip to content

Commit

Permalink
Added config for title and header elements
Browse files Browse the repository at this point in the history
  • Loading branch information
andykirk committed Jul 1, 2015
1 parent d78c91f commit 7700a0c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion footnotes/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,12 @@
var $footnotes = $contents.find('.footnotes');

if ($footnotes.length == 0) {
var container = '<section class="footnotes"><header><h2>Footnotes</h2></header><ol>' + footnote + '</ol></section>';
var header_title = editor.config.footnotesTitle ? editor.config.footnotesTitle : 'Footnotes';
var header_els = ['<h2>', '</h2>'];//editor.config.footnotesPrefix
if (editor.config.footnotesTitle) {
header_els = editor.config.footnotesHeaderEls;
}
var container = '<section class="footnotes"><header>' + header_els[0] + header_title + header_els[1] + '</header><ol>' + footnote + '</ol></section>';
// Move cursor to end of content:
var range = editor.createRange();
range.moveToElementEditEnd(range.root);
Expand Down

0 comments on commit 7700a0c

Please sign in to comment.