mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
Ordered list support
This commit is contained in:
parent
c45932c6b8
commit
f4dca37a93
14 changed files with 316 additions and 31 deletions
|
@ -95,13 +95,23 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument)
|
|||
if (cls.indexOf('list') >= 0)
|
||||
{
|
||||
var listType = /(?:^| )list:(\S+)/.exec(cls);
|
||||
var start = /(?:^| )start:(\S+)/.exec(cls);
|
||||
if (listType)
|
||||
{
|
||||
listType = listType[1];
|
||||
start = start?'start="'+start[1]+'"':'';
|
||||
if (listType)
|
||||
{
|
||||
preHtml = '<ul class="list-' + listType + '"><li>';
|
||||
postHtml = '</li></ul>';
|
||||
if(listType.indexOf("number") < 0)
|
||||
{
|
||||
preHtml = '<ul class="list-' + listType + '"><li>';
|
||||
postHtml = '</li></ul>';
|
||||
}
|
||||
else
|
||||
{
|
||||
preHtml = '<ol '+start+' class="list-' + listType + '"><li>';
|
||||
postHtml = '</li></ol>';
|
||||
}
|
||||
}
|
||||
result.lineMarker += txt.length;
|
||||
return; // don't append any text
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue