}
if (this.autoClean) {
new Roo.htmleditor.FilterParagraph({node : this.doc.body}); // paragraphs
+ Roo.log('FILTER PARA');
+ Roo.log(this.doc.body);
new Roo.htmleditor.FilterSpan({node : this.doc.body}); // empty spans
+ Roo.log('FILTER SPAN');
+ Roo.log(this.doc.body);
}
- Roo.log('AUTO CLEAN');
- Roo.log(this.doc.body);
if (this.enableBlocks) {
Roo.htmleditor.Block.initAll(this.doc.body);
}
-
- Roo.log('ENABLE BLOCKS');
- Roo.log(this.doc.body);
this.updateLanguage();
);var E=new Roo.htmleditor.TidySerializer({inner:true});D=E.serialize(B);}if(Roo.isSafari){var bs=bd.getAttribute('style');var m=bs?bs.match(/text-align:(.*?);/i):false;if(m&&m[1]){D='<div style="'+m[0]+'">'+D+'</div>';}}D=this.cleanHtml(D);D=D.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\u0080-\uFFFF]/g,function(F){var cc=F.charCodeAt();
if(F.length==2){var G=F.charCodeAt(0)-0xD800;var H=F.charCodeAt(1)-0xDC00;cc=(G*0x400)+H+0x10000;}else if((cc>=0x4E00&&cc<0xA000)||(cc>=0x3400&&cc<0x4E00)||(cc>=0xf900&&cc<0xfb00)){return F;}return "&#"+cc+";";});if(this.owner.fireEvent('beforesync',this,D)!==false){this.el.dom.value=D;
this.owner.fireEvent('sync',this,D);}}},pushValue:function(){Roo.log("HtmlEditorCore:pushValue (TEXT->EDITOR)");if(this.initialized){var v=this.el.dom.value.trim();Roo.log(v);if(this.owner.fireEvent('beforepush',this,v)!==false){var d=(this.doc.body||this.doc.documentElement);
-d.innerHTML=v;this.el.dom.value=d.innerHTML;this.owner.fireEvent('push',this,v);}if(this.autoClean){new Roo.htmleditor.FilterParagraph({node:this.doc.body});new Roo.htmleditor.FilterSpan({node:this.doc.body});}Roo.log('AUTO CLEAN');Roo.log(this.doc.body);
-if(this.enableBlocks){Roo.htmleditor.Block.initAll(this.doc.body);}Roo.log('ENABLE BLOCKS');Roo.log(this.doc.body);this.updateLanguage();var lc=this.doc.body.lastChild;if(lc&&lc.nodeType==1&&lc.getAttribute("contenteditable")=="false"){this.doc.body.appendChild(this.doc.createElement('br'));
+d.innerHTML=v;this.el.dom.value=d.innerHTML;this.owner.fireEvent('push',this,v);}if(this.autoClean){new Roo.htmleditor.FilterParagraph({node:this.doc.body});Roo.log('FILTER PARA');Roo.log(this.doc.body);new Roo.htmleditor.FilterSpan({node:this.doc.body});
+Roo.log('FILTER SPAN');Roo.log(this.doc.body);}if(this.enableBlocks){Roo.htmleditor.Block.initAll(this.doc.body);}this.updateLanguage();var lc=this.doc.body.lastChild;if(lc&&lc.nodeType==1&&lc.getAttribute("contenteditable")=="false"){this.doc.body.appendChild(this.doc.createElement('br'));
}}},deferFocus:function(){this.focus.defer(10,this);},focus:function(){if(this.win&&!this.sourceEditMode){this.win.focus();}else{this.el.focus();}},assignDocWin:function(){var A=this.iframe;if(Roo.isIE){this.doc=A.contentWindow.document;this.win=A.contentWindow;
}else{if(!Roo.get(this.frameId)&&!A.contentDocument){return;}this.doc=(A.contentDocument||Roo.get(this.frameId).dom.document);this.win=(A.contentWindow||Roo.get(this.frameId).dom.contentWindow);}},initEditor:function(){this.assignDocWin();this.doc.designMode="on";
this.doc.open();this.doc.write(this.getDocMarkup());this.doc.close();var A=(this.doc.body||this.doc.documentElement);A.bgProperties='fixed';A.setAttribute("translate","no");Roo.EventManager.on(this.doc,{'mouseup':this.onEditorEvent,'dblclick':this.onEditorEvent,'click':this.onEditorEvent,'keyup':this.onEditorEvent,buffer:100,scope:this}
}
if (this.autoClean) {
new Roo.htmleditor.FilterParagraph({node : this.doc.body}); // paragraphs
+ Roo.log('FILTER PARA');
+ Roo.log(this.doc.body);
new Roo.htmleditor.FilterSpan({node : this.doc.body}); // empty spans
+ Roo.log('FILTER SPAN');
+ Roo.log(this.doc.body);
}
- Roo.log('AUTO CLEAN');
- Roo.log(this.doc.body);
if (this.enableBlocks) {
Roo.htmleditor.Block.initAll(this.doc.body);
}
-
- Roo.log('ENABLE BLOCKS');
- Roo.log(this.doc.body);
this.updateLanguage();
}
if (this.autoClean) {
new Roo.htmleditor.FilterParagraph({node : this.doc.body}); // paragraphs
+ Roo.log('FILTER PARA');
+ Roo.log(this.doc.body);
new Roo.htmleditor.FilterSpan({node : this.doc.body}); // empty spans
+ Roo.log('FILTER SPAN');
+ Roo.log(this.doc.body);
}
- Roo.log('AUTO CLEAN');
- Roo.log(this.doc.body);
if (this.enableBlocks) {
Roo.htmleditor.Block.initAll(this.doc.body);
}
-
- Roo.log('ENABLE BLOCKS');
- Roo.log(this.doc.body);
this.updateLanguage();
);var E=new Roo.htmleditor.TidySerializer({inner:true});D=E.serialize(B);}if(Roo.isSafari){var bs=bd.getAttribute('style');var m=bs?bs.match(/text-align:(.*?);/i):false;if(m&&m[1]){D='<div style="'+m[0]+'">'+D+'</div>';}}D=this.cleanHtml(D);D=D.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\u0080-\uFFFF]/g,function(F){var cc=F.charCodeAt();
if(F.length==2){var G=F.charCodeAt(0)-0xD800;var H=F.charCodeAt(1)-0xDC00;cc=(G*0x400)+H+0x10000;}else if((cc>=0x4E00&&cc<0xA000)||(cc>=0x3400&&cc<0x4E00)||(cc>=0xf900&&cc<0xfb00)){return F;}return "&#"+cc+";";});if(this.owner.fireEvent('beforesync',this,D)!==false){this.el.dom.value=D;
this.owner.fireEvent('sync',this,D);}}},pushValue:function(){Roo.log("HtmlEditorCore:pushValue (TEXT->EDITOR)");if(this.initialized){var v=this.el.dom.value.trim();Roo.log(v);if(this.owner.fireEvent('beforepush',this,v)!==false){var d=(this.doc.body||this.doc.documentElement);
-d.innerHTML=v;this.el.dom.value=d.innerHTML;this.owner.fireEvent('push',this,v);}if(this.autoClean){new Roo.htmleditor.FilterParagraph({node:this.doc.body});new Roo.htmleditor.FilterSpan({node:this.doc.body});}Roo.log('AUTO CLEAN');Roo.log(this.doc.body);
-if(this.enableBlocks){Roo.htmleditor.Block.initAll(this.doc.body);}Roo.log('ENABLE BLOCKS');Roo.log(this.doc.body);this.updateLanguage();var lc=this.doc.body.lastChild;if(lc&&lc.nodeType==1&&lc.getAttribute("contenteditable")=="false"){this.doc.body.appendChild(this.doc.createElement('br'));
+d.innerHTML=v;this.el.dom.value=d.innerHTML;this.owner.fireEvent('push',this,v);}if(this.autoClean){new Roo.htmleditor.FilterParagraph({node:this.doc.body});Roo.log('FILTER PARA');Roo.log(this.doc.body);new Roo.htmleditor.FilterSpan({node:this.doc.body});
+Roo.log('FILTER SPAN');Roo.log(this.doc.body);}if(this.enableBlocks){Roo.htmleditor.Block.initAll(this.doc.body);}this.updateLanguage();var lc=this.doc.body.lastChild;if(lc&&lc.nodeType==1&&lc.getAttribute("contenteditable")=="false"){this.doc.body.appendChild(this.doc.createElement('br'));
}}},deferFocus:function(){this.focus.defer(10,this);},focus:function(){if(this.win&&!this.sourceEditMode){this.win.focus();}else{this.el.focus();}},assignDocWin:function(){var A=this.iframe;if(Roo.isIE){this.doc=A.contentWindow.document;this.win=A.contentWindow;
}else{if(!Roo.get(this.frameId)&&!A.contentDocument){return;}this.doc=(A.contentDocument||Roo.get(this.frameId).dom.document);this.win=(A.contentWindow||Roo.get(this.frameId).dom.contentWindow);}},initEditor:function(){this.assignDocWin();this.doc.designMode="on";
this.doc.open();this.doc.write(this.getDocMarkup());this.doc.close();var A=(this.doc.body||this.doc.documentElement);A.bgProperties='fixed';A.setAttribute("translate","no");Roo.EventManager.on(this.doc,{'mouseup':this.onEditorEvent,'dblclick':this.onEditorEvent,'click':this.onEditorEvent,'keyup':this.onEditorEvent,buffer:100,scope:this}