mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 06:37:10 -04:00
added internal ordered list support. Numbering increment is not yet handled. small code factorisation. Added related CSS
This commit is contained in:
parent
9e509677dc
commit
239742e80c
2 changed files with 30 additions and 3 deletions
|
@ -5218,7 +5218,7 @@ function OUTER(gscope)
|
|||
}
|
||||
}
|
||||
|
||||
function doInsertUnorderedList()
|
||||
function doInsertUnorderedList(type)
|
||||
{
|
||||
if (!(rep.selStart && rep.selEnd))
|
||||
{
|
||||
|
@ -5233,7 +5233,7 @@ function OUTER(gscope)
|
|||
for (var n = firstLine; n <= lastLine; n++)
|
||||
{
|
||||
var listType = getLineListType(n);
|
||||
if (!listType || listType.slice(0, 'bullet'.length) != 'bullet')
|
||||
if (!listType || listType.slice(0, type.length) != type)
|
||||
{
|
||||
allLinesAreList = false;
|
||||
break;
|
||||
|
@ -5252,11 +5252,19 @@ function OUTER(gscope)
|
|||
level = Number(listType[2]);
|
||||
}
|
||||
var t = getLineListType(n);
|
||||
mods.push([n, allLinesAreList ? 'indent' + level : (t ? 'bullet' + level : 'bullet1')]);
|
||||
mods.push([n, allLinesAreList ? 'indent' + level : (t ? type + level : type + '1')]);
|
||||
}
|
||||
setLineListTypes(mods);
|
||||
}
|
||||
|
||||
function doInsertUnorderedList(){
|
||||
doInsertList('bullet');
|
||||
}
|
||||
function doInsertOrderedList(){
|
||||
doInsertList('number');
|
||||
}
|
||||
editorInfo.ace_doInsertUnorderedList = doInsertUnorderedList;
|
||||
editorInfo.ace_doInsertOrderedList = doInsertOrderedList;
|
||||
|
||||
var mozillaFakeArrows = (browser.mozilla && (function()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue