-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfootNote.js
40 lines (30 loc) · 975 Bytes
/
footNote.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
var eejs = require('ep_etherpad-lite/node/eejs/');
var ChangeSet = require("ep_etherpad-lite/static/js/Changeset");
function eejsBlock_editbarMenuLeft(hook_name,args,cb){
args.content += eejs.require('ep_foot_note/templates/fnButton.ejs');
return cb();
}
function getLineHTMLForExport(hook,context){
var fn = checkFootNoteInLine(context.attribLine,context.apool);
if(fn){
return '';
}
}
function checkFootNoteInLine(lineAttrib,pool){
var fn= null;
if(lineAttrib){
var iter = ChangeSet.opIterator(lineAttrib);
if(iter.hasNext()){
var op = iter.next();
fn = ChangeSet.opAttributeValue(op,'fnss',pool);
}
}
return fn;
}
function eejsBlock_styles (hook_name, args, cb) {
args.content = args.content + eejs.require("ep_foot_note/templates/styles.html", {}, module);
return cb();
}
exports.eejsBlock_editbarMenuLeft = eejsBlock_editbarMenuLeft;
exports.getLineHTMLForExport = getLineHTMLForExport;
exports.eejsBlock_styles = eejsBlock_styles;