From 6fb20c578f97c66125122ff9a71751a946083328 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 5 Feb 2010 04:18:00 +0100 Subject: remove other headline properties on setting (no sense in setting two headlines at one region) --- etherpad/src/static/js/ace.js | 2 +- infrastructure/ace/www/ace2_inner.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/etherpad/src/static/js/ace.js b/etherpad/src/static/js/ace.js index 96b103d..18fdb6c 100644 --- a/etherpad/src/static/js/ace.js +++ b/etherpad/src/static/js/ace.js @@ -20,7 +20,7 @@ var L=function(Q){return'\''"];T.push(("('\\n\'');T.push('\' \''); var X='editorId = "'+A.id+'"; editorInfo = parent.'+K+'.registry[editorId]; window.onload = function() { window.onload = null; setTimeout(function() { var iframe = document.createElement("IFRAME"); iframe.scrolling = "no"; var outerdocbody = document.getElementById("outerdocbody"); iframe.frameBorder = 0; iframe.allowTransparency = true; outerdocbody.insertBefore(iframe, outerdocbody.firstChild); iframe.ace_outerWin = window; readyFunc = function() { editorInfo.onEditorReady(); readyFunc = null; editorInfo = null; }; var doc = iframe.contentWindow.document; doc.open(); doc.write('+T.join("+")+"); doc.close(); }, 0); }"; var Y=[W,"",(''),'',"\x3cscript>",X,"\x3c/script>",'
x
']; diff --git a/infrastructure/ace/www/ace2_inner.js b/infrastructure/ace/www/ace2_inner.js index a6233d3..645e406 100644 --- a/infrastructure/ace/www/ace2_inner.js +++ b/infrastructure/ace/www/ace2_inner.js @@ -2086,6 +2086,13 @@ function OUTER(gscope) { [[attributeName,'']]); } else { + if (attributeName == 'h1' || attributeName == 'h2' || attributeName == 'h3' || + attributeName == 'h4' || attributeName == 'h5' || attributeName == 'h6') { + performDocumentApplyAttributesToRange(rep.selStart, rep.selEnd, + [['h1',''], ['h2',''], ['h3',''], + ['h4',''], ['h5',''], ['h6','']]); + } + performDocumentApplyAttributesToRange(rep.selStart, rep.selEnd, [[attributeName,'true']]); } -- cgit v1.2.3