mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-04 22:27:10 -04:00
bring indentation and ordered list support to timeslider. Still miss numbering :/
This commit is contained in:
parent
cd15ad24ab
commit
308a20bf11
2 changed files with 56 additions and 4 deletions
|
@ -195,6 +195,8 @@ float:right;
|
||||||
color: #222;
|
color: #222;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul { margin-left: 1.5em; }
|
||||||
|
ul ul { margin-left: 0 !important; }
|
||||||
ul { margin-left: 1.5em; }
|
ul { margin-left: 1.5em; }
|
||||||
ul ul { margin-left: 0 !important; }
|
ul ul { margin-left: 0 !important; }
|
||||||
ul.list-bullet1 { margin-left: 1.5em; }
|
ul.list-bullet1 { margin-left: 1.5em; }
|
||||||
|
@ -216,3 +218,40 @@ ul.list-bullet6 { list-style-type: square; }
|
||||||
ul.list-bullet7 { list-style-type: disc; }
|
ul.list-bullet7 { list-style-type: disc; }
|
||||||
ul.list-bullet8 { list-style-type: circle; }
|
ul.list-bullet8 { list-style-type: circle; }
|
||||||
|
|
||||||
|
ol.list-number1 { margin-left: 1.5em; }
|
||||||
|
ol.list-number2 { margin-left: 3em; }
|
||||||
|
ol.list-number3 { margin-left: 4.5em; }
|
||||||
|
ol.list-number4 { margin-left: 6em; }
|
||||||
|
ol.list-number5 { margin-left: 7.5em; }
|
||||||
|
ol.list-number6 { margin-left: 9em; }
|
||||||
|
ol.list-number7 { margin-left: 10.5em; }
|
||||||
|
ol.list-number8 { margin-left: 12em; }
|
||||||
|
|
||||||
|
ol { list-style-type: disc; }
|
||||||
|
ol.list-number1 { list-style-type: decimal; }
|
||||||
|
ol.list-number2 { list-style-type: lower-latin; }
|
||||||
|
ol.list-number3 { list-style-type: lower-roman; }
|
||||||
|
ol.list-number4 { list-style-type: decimal; }
|
||||||
|
ol.list-number5 { list-style-type: lower-latin; }
|
||||||
|
ol.list-number6 { list-style-type: lower-roman; }
|
||||||
|
ol.list-number7 { list-style-type: decimal; }
|
||||||
|
ol.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; }
|
||||||
|
ul.list-indent4 { margin-left: 6em; }
|
||||||
|
ul.list-indent5 { margin-left: 7.5em; }
|
||||||
|
ul.list-indent6 { margin-left: 9em; }
|
||||||
|
ul.list-indent7 { margin-left: 10.5em; }
|
||||||
|
ul.list-indent8 { margin-left: 12em; }
|
||||||
|
|
||||||
|
ul.list-indent1 { list-style-type: none; }
|
||||||
|
ul.list-indent2 { list-style-type: none; }
|
||||||
|
ul.list-indent3 { list-style-type: none; }
|
||||||
|
ul.list-indent4 { list-style-type: none; }
|
||||||
|
ul.list-indent5 { list-style-type: none; }
|
||||||
|
ul.list-indent6 { list-style-type: none; }
|
||||||
|
ul.list-indent7 { list-style-type: none; }
|
||||||
|
ul.list-indent8 { list-style-type: none; }
|
||||||
|
|
||||||
|
|
|
@ -88,13 +88,23 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument)
|
||||||
if (cls.indexOf('list') >= 0)
|
if (cls.indexOf('list') >= 0)
|
||||||
{
|
{
|
||||||
var listType = /(?:^| )list:(\S+)/.exec(cls);
|
var listType = /(?:^| )list:(\S+)/.exec(cls);
|
||||||
|
var start = /(?:^| )start:(\S+)/.exec(cls);
|
||||||
if (listType)
|
if (listType)
|
||||||
{
|
{
|
||||||
listType = listType[1];
|
listType = listType[1];
|
||||||
|
start = start?'start="'+start[1]+'"':'';
|
||||||
if (listType)
|
if (listType)
|
||||||
{
|
{
|
||||||
preHtml = '<ul class="list-' + listType + '"><li>';
|
if(listType.indexOf("number") < 0)
|
||||||
postHtml = '</li></ul>';
|
{
|
||||||
|
preHtml = '<ul class="list-' + listType + '"><li>';
|
||||||
|
postHtml = '</li></ul>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
preHtml = '<ol '+start+' class="list-' + listType + '"><li>';
|
||||||
|
postHtml = '</li></ol>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
result.lineMarker += txt.length;
|
result.lineMarker += txt.length;
|
||||||
return; // don't append any text
|
return; // don't append any text
|
||||||
|
@ -135,8 +145,7 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument)
|
||||||
|
|
||||||
plugins_.callHook("aceCreateDomLine", {
|
plugins_.callHook("aceCreateDomLine", {
|
||||||
domline: domline,
|
domline: domline,
|
||||||
cls: cls,
|
cls: cls
|
||||||
document: document
|
|
||||||
}).map(function(modifier)
|
}).map(function(modifier)
|
||||||
{
|
{
|
||||||
cls = modifier.cls;
|
cls = modifier.cls;
|
||||||
|
@ -152,6 +161,10 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument)
|
||||||
{
|
{
|
||||||
if (href)
|
if (href)
|
||||||
{
|
{
|
||||||
|
if(!~href.indexOf("http")) // if the url doesn't include http or https etc prefix it.
|
||||||
|
{
|
||||||
|
href = "http://"+href;
|
||||||
|
}
|
||||||
extraOpenTags = extraOpenTags + '<a href="' + href.replace(/\"/g, '"') + '">';
|
extraOpenTags = extraOpenTags + '<a href="' + href.replace(/\"/g, '"') + '">';
|
||||||
extraCloseTags = '</a>' + extraCloseTags;
|
extraCloseTags = '</a>' + extraCloseTags;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue