new hook: aceSetAuthorStyle

pull/1797/head
Chia-liang Kao 2013-06-06 12:59:56 +08:00
parent eae9faa28c
commit 548f31a46a
1 changed files with 15 additions and 1 deletions

View File

@ -213,8 +213,22 @@ function Ace2Inner(){
if (!dynamicCSS) {
return;
}
var authorSelector = getAuthorColorClassSelector(getAuthorClassName(author));
var authorStyleSet = hooks.callAll('aceSetAuthorStyle', {
dynamicCSS: dynamicCSS,
parentDynamicCSS: parentDynamicCSS,
info: info,
author: author,
authorSelector: authorSelector,
});
// Prevent default behaviour if any hook says so
if (_.any(authorStyleSet, function(it) { return it }))
{
return
}
if (!info)
{
dynamicCSS.removeSelectorStyle(authorSelector);