working colors

export-author-color
John McLear 2016-05-31 06:49:12 +08:00
parent 2a5a77229a
commit 5cd781d09f
1 changed files with 3 additions and 2 deletions

View File

@ -118,8 +118,9 @@ function getHTMLFromAtext(pad, atext, authorColors)
var propName = "author" + stripDotFromAuthorID(attr[1]);
var newLength = props.push(propName);
anumMap[a] = newLength -1;
authorManager.getAuthorColorId(attr[1], function(k,v){
css+="." + propName + " {background-color: " + v + "}\n";
var palette = authorManager.getColorPalette();
authorManager.getAuthorColorId(attr[1], function(k,colorId){
css+="." + propName + " {background-color: " + palette[colorId] + "}\n";
});
} else if(attr[0] === "removed") {
var propName = "removed";