mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
keep integrity on paste and better styling but new lists dont reset counter
This commit is contained in:
parent
2e76bd4e50
commit
90c5b26e89
2 changed files with 16 additions and 12 deletions
|
@ -114,11 +114,13 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument)
|
|||
else
|
||||
{
|
||||
if(start){ // is it a start of a list with more than one item in?
|
||||
if(start[1] == 1){ // if its the first one
|
||||
preHtml = '<ol class="list-start-' + listType + ' list-' + Security.escapeHTMLAttribute(listType) + '"><li>';
|
||||
}else{ // its the second+ item in this list level
|
||||
preHtml = '<ol class="list-' + Security.escapeHTMLAttribute(listType) + '"><li>';
|
||||
if(start[1] == 1){ // if its the first one at this level?
|
||||
preHtml = '<ol start=1 class="list-start-' + listType + ' list-' + Security.escapeHTMLAttribute(listType) + '"><li>';
|
||||
}else{ // its not the first item in this list level
|
||||
preHtml = '<ol start='+start[1]+' class="list-' + Security.escapeHTMLAttribute(listType) + '"><li>';
|
||||
}
|
||||
}else{
|
||||
preHtml = '<ol class="list-' + Security.escapeHTMLAttribute(listType) + '"><li>'; // Handles pasted contents into existing lists
|
||||
}
|
||||
postHtml = '</li></ol>';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue