keep integrity on paste and better styling but new lists dont reset counter
This commit is contained in:
parent
2e76bd4e50
commit
90c5b26e89
|
@ -192,21 +192,23 @@ p {
|
|||
|
||||
ol {
|
||||
display: list-item;
|
||||
list-style-type: decimal;
|
||||
}
|
||||
|
||||
ol > li {
|
||||
display:list-item;
|
||||
display:inline;
|
||||
}
|
||||
|
||||
/* Set the indentation */
|
||||
ol.list-number1{ text-indent: 20px; }
|
||||
ol.list-number2{ text-indent: 30px; }
|
||||
ol.list-number3{ text-indent: 40px; }
|
||||
ol.list-number4{ text-indent: 50px; }
|
||||
ol.list-number5{ text-indent: 60px; }
|
||||
ol.list-number6{ text-indent: 70px; }
|
||||
ol.list-number7{ text-indent: 80px; }
|
||||
ol.list-number8{ text-indent: 90px; }
|
||||
ol.list-number1{ text-indent: 0px; }
|
||||
ol.list-number2{ text-indent: 10px; }
|
||||
ol.list-number3{ text-indent: 20px; }
|
||||
ol.list-number4{ text-indent: 30px; }
|
||||
ol.list-number5{ text-indent: 40px; }
|
||||
ol.list-number6{ text-indent: 50px; }
|
||||
ol.list-number7{ text-indent: 60px; }
|
||||
ol.list-number8{ text-indent: 70px; }
|
||||
|
||||
/* Add styling to the first item in a list */
|
||||
body{
|
||||
|
|
|
@ -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…
Reference in New Issue