projects
/
roojs1
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Roo/htmleditor/TidyWriter.js
[roojs1]
/
Roo
/
htmleditor
/
TidyWriter.js
diff --git
a/Roo/htmleditor/TidyWriter.js
b/Roo/htmleditor/TidyWriter.js
index
4dad02b
..
575efdc
100644
(file)
--- a/
Roo/htmleditor/TidyWriter.js
+++ b/
Roo/htmleditor/TidyWriter.js
@@
-5,7
+5,7
@@
*
* Known issues?
* - not tested much with 'PRE' formated elements.
*
* 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 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 this element is inline - then don't add stuff beforehand..
- if (!
in
_inline && !this.in_pre) {
+ if (!
e
_inline && !this.in_pre) {
this.addLine();
}
this.addLine();
}
@@
-95,8
+100,9
@@
Roo.htmleditor.TidyWriter.prototype = {
} else {
this.html[this.html.length] = '></' + name.toLowerCase() + '>';
}
} else {
this.html[this.html.length] = '></' + name.toLowerCase() + '>';
}
+ 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;
this.addLine();
}
return;