* This is based loosely on tinymce
* @class Roo.htmleditor.TidyWriter
* https://github.com/thorn0/tinymce.html/blob/master/tinymce.html.js
+ *
+ * Known issues?
+ * - not tested much with 'PRE' formated elements.
+ * - BR insined inline?
+ *
+ *
*/
Roo.htmleditor.TidyWriter = function(settings)
this.html[this.html.length] = text;
return;
}
- // see if last line is a line break
+ // see if last element was a inline element.
var indentstr = this.indentstr;
- if (node.previousSibling && node.previousSibling.nodeType == 1 && Roo.htmleditor.TidyWriter.inline_elements.indexOf(node.previousSibling.nodeName) > -1) {
+ if (node.previousSibling &&
+ node.previousSibling.nodeType == 1 &&
+ Roo.htmleditor.TidyWriter.inline_elements.indexOf(node.previousSibling.nodeName) > -1)
+ {
indentstr = '';
} else {
this.addLine();