mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
added a colorPicker
This commit is contained in:
parent
5d30c8b4a5
commit
9d37d91ce1
8 changed files with 594 additions and 51 deletions
|
@ -471,26 +471,19 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options)
|
|||
|
||||
function tellAceAuthorInfo(userId, colorId, inactive)
|
||||
{
|
||||
if (colorId || (typeof colorId) == "number")
|
||||
var cssColor = colorId;
|
||||
if (inactive)
|
||||
{
|
||||
colorId = Number(colorId);
|
||||
if (options && options.colorPalette && options.colorPalette[colorId])
|
||||
{
|
||||
var cssColor = options.colorPalette[colorId];
|
||||
if (inactive)
|
||||
{
|
||||
editor.setAuthorInfo(userId, {
|
||||
bgcolor: cssColor,
|
||||
fade: 0.5
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
editor.setAuthorInfo(userId, {
|
||||
bgcolor: cssColor
|
||||
});
|
||||
}
|
||||
}
|
||||
editor.setAuthorInfo(userId, {
|
||||
bgcolor: cssColor,
|
||||
fade: 0.5
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
editor.setAuthorInfo(userId, {
|
||||
bgcolor: cssColor
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue