X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo%2Fhtmleditor%2FTidyWriter.js;h=575efdc3625914d4347b2bc132345cbfe46345bc;hb=b85f624217edf58108ae121a01b6d0e9a7d613b5;hp=4dad02be8b7496a606f869af9382b3370c75550e;hpb=8ba4a1f9de1fd281e89367acf15104e6f72cf98b;p=roojs1 diff --git a/Roo/htmleditor/TidyWriter.js b/Roo/htmleditor/TidyWriter.js index 4dad02be8b..575efdc362 100644 --- a/Roo/htmleditor/TidyWriter.js +++ b/Roo/htmleditor/TidyWriter.js @@ -5,7 +5,7 @@ * * Known issues? * - not tested much with 'PRE' formated elements. - * - BR insined inline? + * - long text inside of inline can be wrapped and clened? * * */ @@ -72,11 +72,16 @@ Roo.htmleditor.TidyWriter.prototype = { var is_short = empty ? Roo.htmleditor.TidyWriter.shortend_elements.indexOf(name) > -1 : false; + var i_inline = name == 'BR' ? false : in_inline; - var indentstr = in_inline || this.in_pre ? '' : this.indentstr; + var indentstr = in_inli_inlineine || this.in_pre ? '' : this.indentstr; + + // e_inline = elements that can be inline, but still allow \n before and after? + // only 'BR' ??? any others? + var e_inline = name == 'BR' ? false : this.in_inline; // if this element is inline - then don't add stuff beforehand.. - if (!in_inline && !this.in_pre) { + if (!e_inline && !this.in_pre) { this.addLine(); } @@ -95,8 +100,9 @@ Roo.htmleditor.TidyWriter.prototype = { } else { this.html[this.html.length] = '>'; } + var e_inline = name == 'BR' ? false : this.in_inline; - if (!this.in_inline && !this.in_pre) { + if (!e_inline && !this.in_pre) { this.addLine(); } return;