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
|
@ -32,6 +32,25 @@ ul.list-bullet6 { list-style-type: square; }
|
|||
ul.list-bullet7 { list-style-type: disc; }
|
||||
ul.list-bullet8 { list-style-type: circle; }
|
||||
|
||||
ul.list-number1 { margin-left: 1.5em; }
|
||||
ul.list-number2 { margin-left: 3em; }
|
||||
ul.list-number3 { margin-left: 4.5em; }
|
||||
ul.list-number4 { margin-left: 6em; }
|
||||
ul.list-number5 { margin-left: 7.5em; }
|
||||
ul.list-number6 { margin-left: 9em; }
|
||||
ul.list-number7 { margin-left: 10.5em; }
|
||||
ul.list-number8 { margin-left: 12em; }
|
||||
|
||||
ul { list-style-type: disc; }
|
||||
ul.list-number1 { list-style-type: decimal; }
|
||||
ul.list-number2 { list-style-type: lower-latin; }
|
||||
ul.list-number3 { list-style-type: lower-roman; }
|
||||
ul.list-number4 { list-style-type: decimal; }
|
||||
ul.list-number5 { list-style-type: lower-latin; }
|
||||
ul.list-number6 { list-style-type: lower-roman; }
|
||||
ul.list-number7 { list-style-type: decimal; }
|
||||
ul.list-number8 { list-style-type: lower-latin; }
|
||||
|
||||
ul.list-indent1 { margin-left: 1.5em; }
|
||||
ul.list-indent2 { margin-left: 3em; }
|
||||
ul.list-indent3 { margin-left: 4.5em; }
|
||||
|
|
|
@ -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