mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-08 08:01:02 -04:00
fixed style disapearing when adding a char + added a comment to describe the trick in contentcollector
This commit is contained in:
parent
edc9212ff1
commit
666bdcaaf8
3 changed files with 5 additions and 2 deletions
|
@ -5267,7 +5267,6 @@ function Ace2Inner(){
|
||||||
}
|
}
|
||||||
setLineListTypes(mods);
|
setLineListTypes(mods);
|
||||||
}
|
}
|
||||||
|
|
||||||
function doInsertUnorderedList(){
|
function doInsertUnorderedList(){
|
||||||
doInsertList('bullet');
|
doInsertList('bullet');
|
||||||
}
|
}
|
||||||
|
|
|
@ -457,6 +457,10 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
|
||||||
}
|
}
|
||||||
else if (!isEmpty)
|
else if (!isEmpty)
|
||||||
{
|
{
|
||||||
|
//It is interesting to notice that the rendering code of this part relies
|
||||||
|
//on the attributes stored in the "class" attribute of the DOM element.
|
||||||
|
//It means that whenever one wants to create a new attribute, he will
|
||||||
|
//need to put it as a class !
|
||||||
var styl = dom.nodeAttr(node, "style");
|
var styl = dom.nodeAttr(node, "style");
|
||||||
var cls = dom.nodeProp(node, "className");
|
var cls = dom.nodeProp(node, "className");
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument)
|
||||||
else if(details[1] == "title")
|
else if(details[1] == "title")
|
||||||
{
|
{
|
||||||
markup = 'h'+Number(details[2]);
|
markup = 'h'+Number(details[2]);
|
||||||
preHtml = '<'+markup+'>';
|
preHtml = '<'+markup+' class="list-' + Security.escapeHTMLAttribute(listType) +' >';
|
||||||
postHtml = '</'+markup+'>';
|
postHtml = '</'+markup+'>';
|
||||||
}
|
}
|
||||||
//handle bullet lists and indentations
|
//handle bullet lists and indentations
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue