autoSize : function(){
//this.el.beginMeasure();
this.textEl.setWidth(1);
- this.setWidth(this.textEl.dom.scrollWidth+this.pnode.getPadding("lr")+this.inner.getPadding("lr"));
+ /*
+ * #2804 [new] Tabs in Roojs
+ * increase the width by 2-4 pixels to prevent the ellipssis showing in chrome
+ */
+ this.setWidth(this.textEl.dom.scrollWidth+this.pnode.getPadding("lr")+this.inner.getPadding("lr") + 2);
//this.el.endMeasure();
},
//var ss = this.el.getStyles('font-size', 'font-family', 'background-image', 'background-repeat');
// this copies styles from the containing element into thsi one..
// not sure why we need all of this..
- var ss = this.el.getStyles('font-size', 'background-image', 'background-repeat');
- ss['background-attachment'] = 'fixed'; // w3c
+ //var ss = this.el.getStyles('font-size', 'background-image', 'background-repeat');
+
+ //var ss = this.el.getStyles( 'background-image', 'background-repeat');
+ //ss['background-attachment'] = 'fixed'; // w3c
dbody.bgProperties = 'fixed'; // ie
- Roo.DomHelper.applyStyles(dbody, ss);
+ //Roo.DomHelper.applyStyles(dbody, ss);
Roo.EventManager.on(this.doc, {
//'mousedown': this.onEditorEvent,
'mouseup': this.onEditorEvent,
if (['IMG', 'BR', 'HR', 'INPUT'].indexOf(tagName) > -1) {
return ret;
}
- if (['PRE', 'TEXTAREA', 'TD', 'A'].indexOf(tagName) > -1) { // or code?
+ if (['PRE', 'TEXTAREA', 'TD', 'A', 'SPAN'].indexOf(tagName) > -1) { // or code?
nopadtext = true;
}
var currentElementChild = currentElement.childNodes.item(i);
var allText = true;
var innerHTML = '';
+ lastnode = '';
while (currentElementChild) {
// Formatting code (indent the tree so it looks nice on the screen)
-
+ var nopad = nopadtext;
+ if (lastnode == 'SPAN') {
+ nopad = true;
+ }
+ // text
if (currentElementChild.nodeName == '#text') {
var toadd = Roo.util.Format.htmlEncode(currentElementChild.nodeValue);
- if (!nopadtext && toadd.length > 80) {
+ if (!nopad && toadd.length > 80) {
innerHTML += "\n" + (new Array( depth + 1 )).join( " " );
}
innerHTML += toadd;
i++;
currentElementChild = currentElement.childNodes.item(i);
+ lastNode = '';
continue;
- }
+ }
allText = false;
- innerHTML += nopadtext ? '' : "\n" + (new Array( depth + 1 )).join( " " );
+
+ innerHTML += nopad ? '' : "\n" + (new Array( depth + 1 )).join( " " );
// Recursively traverse the tree structure of the child node
innerHTML += this.domToHTML(currentElementChild, depth+1, nopadtext);
+ lastnode = currentElementChild.nodeName;
i++;
currentElementChild=currentElement.childNodes.item(i);
}
c.select('[style]').each(function(s) {
s.dom.style.removeProperty(a.actiontype);
});
-
+ editorcore.syncValue();
},
tabIndex:-1
});
html: 'Remove MS Word Formating',
handler: function(a,b) {
editorcore.cleanWord();
-
+ editorcore.syncValue();
},
tabIndex:-1
});
c.select('[style]').each(function(s) {
s.dom.removeAttribute('style');
});
-
+ editorcore.syncValue();
},
tabIndex:-1
});
html: 'Tidy HTML Source',
handler: function(a,b) {
editorcore.doc.body.innerHTML = editorcore.domToHTML();
-
+ editorcore.syncValue();
},
tabIndex:-1
});