From edc9212ff1ca106b9384d3c3d6d30364b17604d7 Mon Sep 17 00:00:00 2001 From: Jean-Tiare Le Bigot Date: Fri, 2 Mar 2012 18:29:15 +0100 Subject: [PATCH] line after a title should be of normal type --- static/js/ace2_inner.js | 7 ++++++- static/js/contentcollector.js | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/static/js/ace2_inner.js b/static/js/ace2_inner.js index 505daddb8..581a9222e 100644 --- a/static/js/ace2_inner.js +++ b/static/js/ace2_inner.js @@ -3367,7 +3367,12 @@ function Ace2Inner(){ var level = Number(listType[2]); //detect empty list item; exclude indentation - if(text === '*' && type !== "indent") + if(type == "title") + { + performDocumentReplaceSelection('\n'); + setLineListType(lineNum + 1, '');//remove the list + } + else if(text === '*' && type !== "indent") { //if not already on the highest level if(level > 1) diff --git a/static/js/contentcollector.js b/static/js/contentcollector.js index 10f3772d5..2e7edd097 100644 --- a/static/js/contentcollector.js +++ b/static/js/contentcollector.js @@ -493,7 +493,7 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class { cc.doAttrib(state, "strikethrough"); } - if (tname == "ul" || tname == "ol") + if (tname == "ul" || tname == "ol" || tname == "h1" || tname == "h2" || tname == "h3" || tname == "h4") { var type; var rr = cls && /(?:^| )list-([a-z]+[12345678])\b/.exec(cls);