*/
actionMode : "el",
+ /**
+ * @cfg {String} style
+ * css styles to add to component
+ * eg. text-align:right;
+ */
+ style : false,
+
/** @private */
getActionEl : function(){
return this[this.actionMode];
if (typeof(o) == 'string') {
return parentNode.appendChild(document.createTextNode(o));
}
- o.tag = o.tag || div;
+ o.tag = o.tag || 'div';
if (o.ns && Roo.isIE) {
ns = false;
o.tag = o.ns + ':' + o.tag;
if (this.enableBlocks) {
new Roo.htmleditor.FilterBlock({ node : div });
}
+
+ var html = div.innerHTML;
+
//?? tidy?
- var tidy = new Roo.htmleditor.TidySerializer({
- inner: true
- });
- var html = tidy.serialize(div);
+ if (this.autoClean) {
+
+ new Roo.htmleditor.FilterAttributes({
+ node : div,
+ attrib_white : [
+ 'href',
+ 'src',
+ 'name',
+ 'align',
+ 'colspan',
+ 'rowspan',
+ 'data-display',
+ 'data-width',
+ 'start' ,
+ 'style',
+ // youtube embed.
+ 'class',
+ 'allowfullscreen',
+ 'frameborder',
+ 'width',
+ 'height',
+ 'alt'
+ ],
+ attrib_clean : ['href', 'src' ]
+ });
+
+ var tidy = new Roo.htmleditor.TidySerializer({
+ inner: true
+ });
+ html = tidy.serialize(div);
+
+ }
if(Roo.isSafari){
// this is a bit odd - but it appears some indents use ql-indent-1
//Roo.log(doc.innerHTML);
- var listpara = doc.getElementsByClassName('MsoListParagraphCxSpFirst');
+ var listpara = Array.from(doc.getElementsByClassName('MsoListParagraphCxSpFirst'));
for( var i = 0; i < listpara.length; i ++) {
- listpara.item(i).className = "MsoListParagraph";
+ listpara[i].className = "MsoListParagraph";
}
- listpara = doc.getElementsByClassName('MsoListParagraphCxSpMiddle');
+ listpara = Array.from(doc.getElementsByClassName('MsoListParagraphCxSpMiddle'));
for( var i = 0; i < listpara.length; i ++) {
- listpara.item(i).className = "MsoListParagraph";
+ listpara[i].className = "MsoListParagraph";
}
- listpara = doc.getElementsByClassName('MsoListParagraphCxSpLast');
+ listpara = Array.from(doc.getElementsByClassName('MsoListParagraphCxSpLast'));
for( var i = 0; i < listpara.length; i ++) {
- listpara.item(i).className = "MsoListParagraph";
+ listpara[i].className = "MsoListParagraph";
}
- listpara = doc.getElementsByClassName('ql-indent-1');
+ listpara = Array.from(doc.getElementsByClassName('ql-indent-1'));
for( var i = 0; i < listpara.length; i ++) {
- listpara.item(i).className = "MsoListParagraph";
+ listpara[i].className = "MsoListParagraph";
}
// this is a bit hacky - we had one word document where h2 had a miso-list attribute.
- var htwo = doc.getElementsByTagName('h2');
+ var htwo = Array.from(doc.getElementsByTagName('h2'));
for( var i = 0; i < htwo.length; i ++) {
- if (htwo.item(i).hasAttribute('style') && htwo.item(i).getAttribute('style').match(/mso-list:/)) {
- htwo.item(i).className = "MsoListParagraph";
+ if (htwo[i].hasAttribute('style') && htwo[i].getAttribute('style').match(/mso-list:/)) {
+ htwo[i].className = "MsoListParagraph";
}
}
- listpara = doc.getElementsByClassName('MsoNormal');
- while(listpara.length) {
- if (listpara.item(0).hasAttribute('style') && listpara.item(0).getAttribute('style').match(/mso-list:/)) {
- listpara.item(0).className = "MsoListParagraph";
+ listpara = Array.from(doc.getElementsByClassName('MsoNormal'));
+ for( var i = 0; i < listpara.length; i ++) {
+ if (listpara[i].hasAttribute('style') && listpara[i].getAttribute('style').match(/mso-list:/)) {
+ listpara[i].className = "MsoListParagraph";
} else {
- listpara.item(0).className = "MsoNormalx";
+ listpara[i].className = "MsoNormalx";
}
}
listpara = doc.getElementsByClassName('MsoListParagraph');
+ // Roo.log(doc.innerHTML);
- //Roo.log(doc.innerHTML);
while(listpara.length) {
lvl = nlvl;
// not starting at 1..
- if (!stack[nlvl].hasAttribute("start") && num > 1) {
+ if (!stack[nlvl].hasAttribute("start") && listtype == "ol") {
stack[nlvl].setAttribute("start", num);
}
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "width",
"type" : "Number",
"memberOf" : "Roo.util.Observable",
"isOptional" : false,
"optvals" : []
+ },
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
}
],
"events" : [
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "value",
"type" : "String",
"memberOf" : "Roo.util.Observable",
"isOptional" : false,
"optvals" : []
+ },
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "",
+ "isOptional" : false,
+ "optvals" : []
}
],
"events" : [
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "todayText",
"type" : "String",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "updateEl",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "stylesheets",
"type" : "Array",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "url",
"type" : "String",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tabIndex",
"type" : "Number",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tabIndex",
"type" : "Number",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tabIndex",
"type" : "Number",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "width",
"type" : "Number",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tabIndex",
"type" : "Number",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tabIndex",
"type" : "Number",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tabIndex",
"type" : "Number",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tabIndex",
"type" : "Number",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tabIndex",
"type" : "Number",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tabIndex",
"type" : "Number",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tabIndex",
"type" : "Number",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tabIndex",
"type" : "Number",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tabIndex",
"type" : "Number",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "stylesheets",
"type" : "Array",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tabIndex",
"type" : "Number",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tabIndex",
"type" : "Number",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tabIndex",
"type" : "Number",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tabIndex",
"type" : "Number",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tabIndex",
"type" : "Number",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tabIndex",
"type" : "Number",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tabIndex",
"type" : "Number",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tag",
"type" : "String",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tabIndex",
"type" : "Number",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "updateEl",
"type" : "Boolean",
"memberOf" : "Roo.util.Observable",
"isOptional" : false,
"optvals" : []
+ },
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
}
],
"events" : [
"memberOf" : "Roo.util.Observable",
"isOptional" : false,
"optvals" : []
+ },
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
}
],
"events" : [
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "text",
"type" : "String",
"memberOf" : "Roo.util.Observable",
"isOptional" : false,
"optvals" : []
+ },
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
}
],
"events" : [
"memberOf" : "Roo.util.Observable",
"isOptional" : false,
"optvals" : []
+ },
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
}
],
"events" : [
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "text",
"type" : "String",
"memberOf" : "Roo.util.Observable",
"isOptional" : false,
"optvals" : []
+ },
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
}
],
"events" : [
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "text",
"type" : "String",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "tree",
"type" : "Roo.tree.TreePanel",
*/
</span><span class="jsdoc-var">actionMode </span><span class="jsdoc-syntax">: </span><span class="jsdoc-string">"el"</span><span class="jsdoc-syntax">,
+ </span><span class="jsdoc-comment">/**
+ * @cfg {String} style
+ * css styles to add to component
+ * eg. text-align:right;
+ */
+ </span><span class="jsdoc-var">style </span><span class="jsdoc-syntax">: </span><span class="jsdoc-keyword">false</span><span class="jsdoc-syntax">,
+
</span><span class="jsdoc-comment">/** @private */
</span><span class="jsdoc-var">getActionEl </span><span class="jsdoc-syntax">: </span><span class="jsdoc-keyword">function</span><span class="jsdoc-syntax">(){
</span><span class="jsdoc-keyword">return </span><span class="jsdoc-var">this</span><span class="jsdoc-syntax">[</span><span class="jsdoc-var">this.actionMode</span><span class="jsdoc-syntax">];
</span><span class="jsdoc-keyword">if </span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">this.enableBlocks</span><span class="jsdoc-syntax">) {
</span><span class="jsdoc-keyword">new </span><span class="jsdoc-var">Roo.htmleditor.FilterBlock</span><span class="jsdoc-syntax">({ </span><span class="jsdoc-var">node </span><span class="jsdoc-syntax">: </span><span class="jsdoc-var">div </span><span class="jsdoc-syntax">});
}
+
+ </span><span class="jsdoc-keyword">var </span><span class="jsdoc-var">html </span><span class="jsdoc-syntax">= </span><span class="jsdoc-var">div.innerHTML</span><span class="jsdoc-syntax">;
+
</span><span class="jsdoc-comment">//?? tidy?
- </span><span class="jsdoc-keyword">var </span><span class="jsdoc-var">tidy </span><span class="jsdoc-syntax">= </span><span class="jsdoc-keyword">new </span><span class="jsdoc-var">Roo.htmleditor.TidySerializer</span><span class="jsdoc-syntax">({
- </span><span class="jsdoc-var">inner</span><span class="jsdoc-syntax">: </span><span class="jsdoc-keyword">true
- </span><span class="jsdoc-syntax">});
- </span><span class="jsdoc-keyword">var </span><span class="jsdoc-var">html </span><span class="jsdoc-syntax">= </span><span class="jsdoc-var">tidy.serialize</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">div</span><span class="jsdoc-syntax">);
+ </span><span class="jsdoc-keyword">if </span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">this.autoClean</span><span class="jsdoc-syntax">) {
+
+ </span><span class="jsdoc-keyword">new </span><span class="jsdoc-var">Roo.htmleditor.FilterAttributes</span><span class="jsdoc-syntax">({
+ </span><span class="jsdoc-var">node </span><span class="jsdoc-syntax">: </span><span class="jsdoc-var">div</span><span class="jsdoc-syntax">,
+ </span><span class="jsdoc-var">attrib_white </span><span class="jsdoc-syntax">: [
+ </span><span class="jsdoc-string">'href'</span><span class="jsdoc-syntax">,
+ </span><span class="jsdoc-string">'src'</span><span class="jsdoc-syntax">,
+ </span><span class="jsdoc-string">'name'</span><span class="jsdoc-syntax">,
+ </span><span class="jsdoc-string">'align'</span><span class="jsdoc-syntax">,
+ </span><span class="jsdoc-string">'colspan'</span><span class="jsdoc-syntax">,
+ </span><span class="jsdoc-string">'rowspan'</span><span class="jsdoc-syntax">,
+ </span><span class="jsdoc-string">'data-display'</span><span class="jsdoc-syntax">,
+ </span><span class="jsdoc-string">'data-width'</span><span class="jsdoc-syntax">,
+ </span><span class="jsdoc-string">'start' </span><span class="jsdoc-syntax">,
+ </span><span class="jsdoc-string">'style'</span><span class="jsdoc-syntax">,
+ </span><span class="jsdoc-comment">// youtube embed.
+ </span><span class="jsdoc-string">'class'</span><span class="jsdoc-syntax">,
+ </span><span class="jsdoc-string">'allowfullscreen'</span><span class="jsdoc-syntax">,
+ </span><span class="jsdoc-string">'frameborder'</span><span class="jsdoc-syntax">,
+ </span><span class="jsdoc-string">'width'</span><span class="jsdoc-syntax">,
+ </span><span class="jsdoc-string">'height'</span><span class="jsdoc-syntax">,
+ </span><span class="jsdoc-string">'alt'
+ </span><span class="jsdoc-syntax">],
+ </span><span class="jsdoc-var">attrib_clean </span><span class="jsdoc-syntax">: [</span><span class="jsdoc-string">'href'</span><span class="jsdoc-syntax">, </span><span class="jsdoc-string">'src' </span><span class="jsdoc-syntax">]
+ });
+
+ </span><span class="jsdoc-keyword">var </span><span class="jsdoc-var">tidy </span><span class="jsdoc-syntax">= </span><span class="jsdoc-keyword">new </span><span class="jsdoc-var">Roo.htmleditor.TidySerializer</span><span class="jsdoc-syntax">({
+ </span><span class="jsdoc-var">inner</span><span class="jsdoc-syntax">: </span><span class="jsdoc-keyword">true
+ </span><span class="jsdoc-syntax">});
+ </span><span class="jsdoc-var">html </span><span class="jsdoc-syntax">= </span><span class="jsdoc-var">tidy.serialize</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">div</span><span class="jsdoc-syntax">);
+
+ }
</span><span class="jsdoc-keyword">if</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">Roo.isSafari</span><span class="jsdoc-syntax">){
</span><span class="jsdoc-comment">// this is a bit odd - but it appears some indents use ql-indent-1
//Roo.log(doc.innerHTML);
- </span><span class="jsdoc-keyword">var </span><span class="jsdoc-var">listpara </span><span class="jsdoc-syntax">= </span><span class="jsdoc-var">doc.getElementsByClassName</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">'MsoListParagraphCxSpFirst'</span><span class="jsdoc-syntax">);
+ </span><span class="jsdoc-keyword">var </span><span class="jsdoc-var">listpara </span><span class="jsdoc-syntax">= </span><span class="jsdoc-var">Array.from</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">doc.getElementsByClassName</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">'MsoListParagraphCxSpFirst'</span><span class="jsdoc-syntax">));
</span><span class="jsdoc-keyword">for</span><span class="jsdoc-syntax">( </span><span class="jsdoc-keyword">var </span><span class="jsdoc-var">i </span><span class="jsdoc-syntax">= 0; </span><span class="jsdoc-var">i </span><span class="jsdoc-syntax">< </span><span class="jsdoc-var">listpara.length</span><span class="jsdoc-syntax">; </span><span class="jsdoc-var">i </span><span class="jsdoc-syntax">++) {
- </span><span class="jsdoc-var">listpara.item</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">i</span><span class="jsdoc-syntax">)</span><span class="jsdoc-var">.className </span><span class="jsdoc-syntax">= </span><span class="jsdoc-string">"MsoListParagraph"</span><span class="jsdoc-syntax">;
+ </span><span class="jsdoc-var">listpara</span><span class="jsdoc-syntax">[</span><span class="jsdoc-var">i</span><span class="jsdoc-syntax">]</span><span class="jsdoc-var">.className </span><span class="jsdoc-syntax">= </span><span class="jsdoc-string">"MsoListParagraph"</span><span class="jsdoc-syntax">;
}
- </span><span class="jsdoc-var">listpara </span><span class="jsdoc-syntax">= </span><span class="jsdoc-var">doc.getElementsByClassName</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">'MsoListParagraphCxSpMiddle'</span><span class="jsdoc-syntax">);
+ </span><span class="jsdoc-var">listpara </span><span class="jsdoc-syntax">= </span><span class="jsdoc-var">Array.from</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">doc.getElementsByClassName</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">'MsoListParagraphCxSpMiddle'</span><span class="jsdoc-syntax">));
</span><span class="jsdoc-keyword">for</span><span class="jsdoc-syntax">( </span><span class="jsdoc-keyword">var </span><span class="jsdoc-var">i </span><span class="jsdoc-syntax">= 0; </span><span class="jsdoc-var">i </span><span class="jsdoc-syntax">< </span><span class="jsdoc-var">listpara.length</span><span class="jsdoc-syntax">; </span><span class="jsdoc-var">i </span><span class="jsdoc-syntax">++) {
- </span><span class="jsdoc-var">listpara.item</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">i</span><span class="jsdoc-syntax">)</span><span class="jsdoc-var">.className </span><span class="jsdoc-syntax">= </span><span class="jsdoc-string">"MsoListParagraph"</span><span class="jsdoc-syntax">;
+ </span><span class="jsdoc-var">listpara</span><span class="jsdoc-syntax">[</span><span class="jsdoc-var">i</span><span class="jsdoc-syntax">]</span><span class="jsdoc-var">.className </span><span class="jsdoc-syntax">= </span><span class="jsdoc-string">"MsoListParagraph"</span><span class="jsdoc-syntax">;
}
- </span><span class="jsdoc-var">listpara </span><span class="jsdoc-syntax">= </span><span class="jsdoc-var">doc.getElementsByClassName</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">'MsoListParagraphCxSpLast'</span><span class="jsdoc-syntax">);
+ </span><span class="jsdoc-var">listpara </span><span class="jsdoc-syntax">= </span><span class="jsdoc-var">Array.from</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">doc.getElementsByClassName</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">'MsoListParagraphCxSpLast'</span><span class="jsdoc-syntax">));
</span><span class="jsdoc-keyword">for</span><span class="jsdoc-syntax">( </span><span class="jsdoc-keyword">var </span><span class="jsdoc-var">i </span><span class="jsdoc-syntax">= 0; </span><span class="jsdoc-var">i </span><span class="jsdoc-syntax">< </span><span class="jsdoc-var">listpara.length</span><span class="jsdoc-syntax">; </span><span class="jsdoc-var">i </span><span class="jsdoc-syntax">++) {
- </span><span class="jsdoc-var">listpara.item</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">i</span><span class="jsdoc-syntax">)</span><span class="jsdoc-var">.className </span><span class="jsdoc-syntax">= </span><span class="jsdoc-string">"MsoListParagraph"</span><span class="jsdoc-syntax">;
+ </span><span class="jsdoc-var">listpara</span><span class="jsdoc-syntax">[</span><span class="jsdoc-var">i</span><span class="jsdoc-syntax">]</span><span class="jsdoc-var">.className </span><span class="jsdoc-syntax">= </span><span class="jsdoc-string">"MsoListParagraph"</span><span class="jsdoc-syntax">;
}
- </span><span class="jsdoc-var">listpara </span><span class="jsdoc-syntax">= </span><span class="jsdoc-var">doc.getElementsByClassName</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">'ql-indent-1'</span><span class="jsdoc-syntax">);
+ </span><span class="jsdoc-var">listpara </span><span class="jsdoc-syntax">= </span><span class="jsdoc-var">Array.from</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">doc.getElementsByClassName</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">'ql-indent-1'</span><span class="jsdoc-syntax">));
</span><span class="jsdoc-keyword">for</span><span class="jsdoc-syntax">( </span><span class="jsdoc-keyword">var </span><span class="jsdoc-var">i </span><span class="jsdoc-syntax">= 0; </span><span class="jsdoc-var">i </span><span class="jsdoc-syntax">< </span><span class="jsdoc-var">listpara.length</span><span class="jsdoc-syntax">; </span><span class="jsdoc-var">i </span><span class="jsdoc-syntax">++) {
- </span><span class="jsdoc-var">listpara.item</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">i</span><span class="jsdoc-syntax">)</span><span class="jsdoc-var">.className </span><span class="jsdoc-syntax">= </span><span class="jsdoc-string">"MsoListParagraph"</span><span class="jsdoc-syntax">;
+ </span><span class="jsdoc-var">listpara</span><span class="jsdoc-syntax">[</span><span class="jsdoc-var">i</span><span class="jsdoc-syntax">]</span><span class="jsdoc-var">.className </span><span class="jsdoc-syntax">= </span><span class="jsdoc-string">"MsoListParagraph"</span><span class="jsdoc-syntax">;
}
</span><span class="jsdoc-comment">// this is a bit hacky - we had one word document where h2 had a miso-list attribute.
- </span><span class="jsdoc-keyword">var </span><span class="jsdoc-var">htwo </span><span class="jsdoc-syntax">= </span><span class="jsdoc-var">doc.getElementsByTagName</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">'h2'</span><span class="jsdoc-syntax">);
+ </span><span class="jsdoc-keyword">var </span><span class="jsdoc-var">htwo </span><span class="jsdoc-syntax">= </span><span class="jsdoc-var">Array.from</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">doc.getElementsByTagName</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">'h2'</span><span class="jsdoc-syntax">));
</span><span class="jsdoc-keyword">for</span><span class="jsdoc-syntax">( </span><span class="jsdoc-keyword">var </span><span class="jsdoc-var">i </span><span class="jsdoc-syntax">= 0; </span><span class="jsdoc-var">i </span><span class="jsdoc-syntax">< </span><span class="jsdoc-var">htwo.length</span><span class="jsdoc-syntax">; </span><span class="jsdoc-var">i </span><span class="jsdoc-syntax">++) {
- </span><span class="jsdoc-keyword">if </span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">htwo.item</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">i</span><span class="jsdoc-syntax">)</span><span class="jsdoc-var">.hasAttribute</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">'style'</span><span class="jsdoc-syntax">) && </span><span class="jsdoc-var">htwo.item</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">i</span><span class="jsdoc-syntax">)</span><span class="jsdoc-var">.getAttribute</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">'style'</span><span class="jsdoc-syntax">)</span><span class="jsdoc-var">.match</span><span class="jsdoc-syntax">(/mso-list:/)) {
- </span><span class="jsdoc-var">htwo.item</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">i</span><span class="jsdoc-syntax">)</span><span class="jsdoc-var">.className </span><span class="jsdoc-syntax">= </span><span class="jsdoc-string">"MsoListParagraph"</span><span class="jsdoc-syntax">;
+ </span><span class="jsdoc-keyword">if </span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">htwo</span><span class="jsdoc-syntax">[</span><span class="jsdoc-var">i</span><span class="jsdoc-syntax">]</span><span class="jsdoc-var">.hasAttribute</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">'style'</span><span class="jsdoc-syntax">) && </span><span class="jsdoc-var">htwo</span><span class="jsdoc-syntax">[</span><span class="jsdoc-var">i</span><span class="jsdoc-syntax">]</span><span class="jsdoc-var">.getAttribute</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">'style'</span><span class="jsdoc-syntax">)</span><span class="jsdoc-var">.match</span><span class="jsdoc-syntax">(/mso-list:/)) {
+ </span><span class="jsdoc-var">htwo</span><span class="jsdoc-syntax">[</span><span class="jsdoc-var">i</span><span class="jsdoc-syntax">]</span><span class="jsdoc-var">.className </span><span class="jsdoc-syntax">= </span><span class="jsdoc-string">"MsoListParagraph"</span><span class="jsdoc-syntax">;
}
}
- </span><span class="jsdoc-var">listpara </span><span class="jsdoc-syntax">= </span><span class="jsdoc-var">doc.getElementsByClassName</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">'MsoNormal'</span><span class="jsdoc-syntax">);
- </span><span class="jsdoc-keyword">while</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">listpara.length</span><span class="jsdoc-syntax">) {
- </span><span class="jsdoc-keyword">if </span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">listpara.item</span><span class="jsdoc-syntax">(0)</span><span class="jsdoc-var">.hasAttribute</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">'style'</span><span class="jsdoc-syntax">) && </span><span class="jsdoc-var">listpara.item</span><span class="jsdoc-syntax">(0)</span><span class="jsdoc-var">.getAttribute</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">'style'</span><span class="jsdoc-syntax">)</span><span class="jsdoc-var">.match</span><span class="jsdoc-syntax">(/mso-list:/)) {
- </span><span class="jsdoc-var">listpara.item</span><span class="jsdoc-syntax">(0)</span><span class="jsdoc-var">.className </span><span class="jsdoc-syntax">= </span><span class="jsdoc-string">"MsoListParagraph"</span><span class="jsdoc-syntax">;
+ </span><span class="jsdoc-var">listpara </span><span class="jsdoc-syntax">= </span><span class="jsdoc-var">Array.from</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">doc.getElementsByClassName</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">'MsoNormal'</span><span class="jsdoc-syntax">));
+ </span><span class="jsdoc-keyword">for</span><span class="jsdoc-syntax">( </span><span class="jsdoc-keyword">var </span><span class="jsdoc-var">i </span><span class="jsdoc-syntax">= 0; </span><span class="jsdoc-var">i </span><span class="jsdoc-syntax">< </span><span class="jsdoc-var">listpara.length</span><span class="jsdoc-syntax">; </span><span class="jsdoc-var">i </span><span class="jsdoc-syntax">++) {
+ </span><span class="jsdoc-keyword">if </span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">listpara</span><span class="jsdoc-syntax">[</span><span class="jsdoc-var">i</span><span class="jsdoc-syntax">]</span><span class="jsdoc-var">.hasAttribute</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">'style'</span><span class="jsdoc-syntax">) && </span><span class="jsdoc-var">listpara</span><span class="jsdoc-syntax">[</span><span class="jsdoc-var">i</span><span class="jsdoc-syntax">]</span><span class="jsdoc-var">.getAttribute</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">'style'</span><span class="jsdoc-syntax">)</span><span class="jsdoc-var">.match</span><span class="jsdoc-syntax">(/mso-list:/)) {
+ </span><span class="jsdoc-var">listpara</span><span class="jsdoc-syntax">[</span><span class="jsdoc-var">i</span><span class="jsdoc-syntax">]</span><span class="jsdoc-var">.className </span><span class="jsdoc-syntax">= </span><span class="jsdoc-string">"MsoListParagraph"</span><span class="jsdoc-syntax">;
} </span><span class="jsdoc-keyword">else </span><span class="jsdoc-syntax">{
- </span><span class="jsdoc-var">listpara.item</span><span class="jsdoc-syntax">(0)</span><span class="jsdoc-var">.className </span><span class="jsdoc-syntax">= </span><span class="jsdoc-string">"MsoNormalx"</span><span class="jsdoc-syntax">;
+ </span><span class="jsdoc-var">listpara</span><span class="jsdoc-syntax">[</span><span class="jsdoc-var">i</span><span class="jsdoc-syntax">]</span><span class="jsdoc-var">.className </span><span class="jsdoc-syntax">= </span><span class="jsdoc-string">"MsoNormalx"</span><span class="jsdoc-syntax">;
}
}
</span><span class="jsdoc-var">listpara </span><span class="jsdoc-syntax">= </span><span class="jsdoc-var">doc.getElementsByClassName</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">'MsoListParagraph'</span><span class="jsdoc-syntax">);
+ </span><span class="jsdoc-comment">// Roo.log(doc.innerHTML);
- </span><span class="jsdoc-comment">//Roo.log(doc.innerHTML);
</span><span class="jsdoc-keyword">while</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">listpara.length</span><span class="jsdoc-syntax">) {
</span><span class="jsdoc-var">lvl </span><span class="jsdoc-syntax">= </span><span class="jsdoc-var">nlvl</span><span class="jsdoc-syntax">;
</span><span class="jsdoc-comment">// not starting at 1..
- </span><span class="jsdoc-keyword">if </span><span class="jsdoc-syntax">(!</span><span class="jsdoc-var">stack</span><span class="jsdoc-syntax">[</span><span class="jsdoc-var">nlvl</span><span class="jsdoc-syntax">]</span><span class="jsdoc-var">.hasAttribute</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">"start"</span><span class="jsdoc-syntax">) && </span><span class="jsdoc-var">num </span><span class="jsdoc-syntax">> 1) {
+ </span><span class="jsdoc-keyword">if </span><span class="jsdoc-syntax">(!</span><span class="jsdoc-var">stack</span><span class="jsdoc-syntax">[</span><span class="jsdoc-var">nlvl</span><span class="jsdoc-syntax">]</span><span class="jsdoc-var">.hasAttribute</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">"start"</span><span class="jsdoc-syntax">) && </span><span class="jsdoc-var">listtype </span><span class="jsdoc-syntax">== </span><span class="jsdoc-string">"ol"</span><span class="jsdoc-syntax">) {
</span><span class="jsdoc-var">stack</span><span class="jsdoc-syntax">[</span><span class="jsdoc-var">nlvl</span><span class="jsdoc-syntax">]</span><span class="jsdoc-var">.setAttribute</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">"start"</span><span class="jsdoc-syntax">, </span><span class="jsdoc-var">num</span><span class="jsdoc-syntax">);
}
"visibility"
]
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "actionMode",
"type" : "String",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"visibility"
]
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"visibility"
]
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "disableClear",
"type" : "Boolean",
"visibility"
]
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "emptyText",
"type" : "String",
"isOptional" : false,
"optvals" : []
},
- {
- "name" : "validationEvent",
- "type" : "String/Boolean",
- "desc" : "The event that should initiate field validation. Set to false to disable\n automatic validation (defaults to \"keyup\").",
- "memberOf" : "Roo.form.Field",
- "isOptional" : false,
- "optvals" : []
- },
{
"name" : "autoCreate",
"type" : "String/Object",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "validationEvent",
+ "type" : "String/Boolean",
+ "desc" : "The event that should initiate field validation. Set to false to disable\n automatic validation (defaults to \"keyup\").",
+ "memberOf" : "Roo.form.Field",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "fieldLabel",
"type" : "String",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "disableClear",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
- {
- "name" : "readOnly",
- "type" : "Boolean",
- "desc" : "True to mark the field as readOnly in HTML (defaults to false) -- Note: this only sets the element's readOnly DOM attribute.",
- "memberOf" : "Roo.form.Field",
- "isOptional" : false,
- "optvals" : []
- },
{
"name" : "shadow",
"type" : "Boolean/String",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "readOnly",
+ "type" : "Boolean",
+ "desc" : "True to mark the field as readOnly in HTML (defaults to false) -- Note: this only sets the element's readOnly DOM attribute.",
+ "memberOf" : "Roo.form.Field",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "focusClass",
"type" : "String",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "disableClear",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
- {
- "name" : "readOnly",
- "type" : "Boolean",
- "desc" : "True to mark the field as readOnly in HTML (defaults to false) -- Note: this only sets the element's readOnly DOM attribute.",
- "memberOf" : "Roo.form.Field",
- "isOptional" : false,
- "optvals" : []
- },
{
"name" : "shadow",
"type" : "Boolean/String",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "readOnly",
+ "type" : "Boolean",
+ "desc" : "True to mark the field as readOnly in HTML (defaults to false) -- Note: this only sets the element's readOnly DOM attribute.",
+ "memberOf" : "Roo.form.Field",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "focusClass",
"type" : "String",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "emptyText",
"type" : "String",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "emptyText",
"type" : "String",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "value",
"type" : "Mixed",
"isOptional" : false,
"optvals" : []
},
- {
- "name" : "autoCreate",
- "type" : "String/Object",
- "desc" : "A DomHelper element spec, or true for a default element spec (defaults to\n{tag: \"input\", type: \"text\", size: \"20\", autocomplete: \"off\"})",
- "memberOf" : "Roo.form.Field",
- "isOptional" : false,
- "optvals" : []
- },
{
"name" : "invalidClass",
"type" : "String",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "autoCreate",
+ "type" : "String/Object",
+ "desc" : "A DomHelper element spec, or true for a default element spec (defaults to\n{tag: \"input\", type: \"text\", size: \"20\", autocomplete: \"off\"})",
+ "memberOf" : "Roo.form.Field",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "validationEvent",
"type" : "String/Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "clearUp",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "emptyText",
"type" : "String",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "emptyText",
"type" : "String",
"isOptional" : false,
"optvals" : []
},
- {
- "name" : "autoCreate",
- "type" : "String/Object",
- "desc" : "A DomHelper element spec, or true for a default element spec (defaults to\n{tag: \"input\", type: \"text\", size: \"20\", autocomplete: \"off\"})",
- "memberOf" : "Roo.form.Field",
- "isOptional" : false,
- "optvals" : []
- },
{
"name" : "invalidClass",
"type" : "String",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "autoCreate",
+ "type" : "String/Object",
+ "desc" : "A DomHelper element spec, or true for a default element spec (defaults to\n{tag: \"input\", type: \"text\", size: \"20\", autocomplete: \"off\"})",
+ "memberOf" : "Roo.form.Field",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "validationEvent",
"type" : "String/Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "disableClear",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "value",
"type" : "Mixed",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "value",
"type" : "Mixed",
"isOptional" : false,
"optvals" : []
},
- {
- "name" : "autoCreate",
- "type" : "String/Object",
- "desc" : "A DomHelper element spec, or true for a default element spec (defaults to\n{tag: \"input\", type: \"text\", size: \"20\", autocomplete: \"off\"})",
- "memberOf" : "Roo.form.Field",
- "isOptional" : false,
- "optvals" : []
- },
{
"name" : "invalidClass",
"type" : "String",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "autoCreate",
+ "type" : "String/Object",
+ "desc" : "A DomHelper element spec, or true for a default element spec (defaults to\n{tag: \"input\", type: \"text\", size: \"20\", autocomplete: \"off\"})",
+ "memberOf" : "Roo.form.Field",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "validationEvent",
"type" : "String/Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "value",
"type" : "Mixed",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
"isOptional" : false,
"optvals" : []
},
+ {
+ "name" : "style",
+ "type" : "String",
+ "desc" : "css styles to add to component\neg. text-align:right;",
+ "memberOf" : "Roo.Component",
+ "isOptional" : false,
+ "optvals" : []
+ },
{
"name" : "allowDomMove",
"type" : "Boolean",
// Roo/Component.js
Roo.Component=function(A){A=A||{};if(A.tagName||A.dom||typeof A=="string"){A={el:A,id:A.id||A};}this.initialConfig=A;Roo.apply(this,A);this.addEvents({disable:true,enable:true,beforeshow:true,show:true,beforehide:true,hide:true,beforerender:true,render:true,beforedestroy:true,destroy:true}
);if(!this.id){this.id="roo-comp-"+(++Roo.Component.AUTO_ID);}Roo.ComponentMgr.register(this);Roo.Component.superclass.constructor.call(this);this.initComponent();if(this.renderTo){this.render(this.renderTo);delete this.renderTo;}};Roo.Component.AUTO_ID=1000;
-Roo.extend(Roo.Component,Roo.util.Observable,{hidden:false,disabled:false,rendered:false,disabledClass:"x-item-disabled",allowDomMove:true,hideMode:'display',ctype:"Roo.Component",actionMode:"el",getActionEl:function(){return this[this.actionMode];},initComponent:Roo.emptyFn,render:function(A,B){if(this.rendered){return this;
-}if(this.fireEvent("beforerender",this)===false){return false;}if(!A&&this.el){this.el=Roo.get(this.el);A=this.el.dom.parentNode;this.allowDomMove=false;}this.container=Roo.get(A);this.rendered=true;if(B!==undefined){if(typeof B=='number'){B=this.container.dom.childNodes[B];
-}else{B=Roo.getDom(B);}}this.onRender(this.container,B||null);if(this.cls){this.el.addClass(this.cls);delete this.cls;}if(this.style){this.el.applyStyles(this.style);delete this.style;}this.fireEvent("render",this);this.afterRender(this.container);if(this.hidden){this.hide();
-}if(this.disabled){this.disable();}return this;},onRender:function(ct,A){if(this.el){this.el=Roo.get(this.el);if(this.allowDomMove!==false){ct.dom.insertBefore(this.el.dom,A);}}},getAutoCreate:function(){var A=typeof this.autoCreate=="object"?this.autoCreate:Roo.apply({}
-,this.defaultAutoCreate);if(this.id&&!A.id){A.id=this.id;}return A;},afterRender:Roo.emptyFn,destroy:function(){if(this.fireEvent("beforedestroy",this)!==false){this.purgeListeners();this.beforeDestroy();if(this.rendered){this.el.removeAllListeners();this.el.remove();
-if(this.actionMode=="container"){this.container.remove();}}this.onDestroy();Roo.ComponentMgr.unregister(this);this.fireEvent("destroy",this);}},beforeDestroy:function(){},onDestroy:function(){},getEl:function(){return this.el;},getId:function(){return this.id;
-},focus:function(A){if(this.rendered){this.el.focus();if(A===true){this.el.dom.select();}}return this;},blur:function(){if(this.rendered){this.el.blur();}return this;},disable:function(){if(this.rendered){this.onDisable();}this.disabled=true;this.fireEvent("disable",this);
-return this;},onDisable:function(){this.getActionEl().addClass(this.disabledClass);this.el.dom.disabled=true;},enable:function(){if(this.rendered){this.onEnable();}this.disabled=false;this.fireEvent("enable",this);return this;},onEnable:function(){this.getActionEl().removeClass(this.disabledClass);
-this.el.dom.disabled=false;},setDisabled:function(A){this[A?"disable":"enable"]();},show:function(){if(this.fireEvent("beforeshow",this)!==false){this.hidden=false;if(this.rendered){this.onShow();}this.fireEvent("show",this);}return this;},onShow:function(){var ae=this.getActionEl();
-if(this.hideMode=='visibility'){ae.dom.style.visibility="visible";}else if(this.hideMode=='offsets'){ae.removeClass('x-hidden');}else{ae.dom.style.display="";}},hide:function(){if(this.fireEvent("beforehide",this)!==false){this.hidden=true;if(this.rendered){this.onHide();
-}this.fireEvent("hide",this);}return this;},onHide:function(){var ae=this.getActionEl();if(this.hideMode=='visibility'){ae.dom.style.visibility="hidden";}else if(this.hideMode=='offsets'){ae.addClass('x-hidden');}else{ae.dom.style.display="none";}},setVisible:function(A){if(A){this.show();
-}else{this.hide();}return this;},isVisible:function(){return this.getActionEl().isVisible();},cloneConfig:function(A){A=A||{};var id=A.id||Roo.id();var B=Roo.applyIf(A,this.initialConfig);B.id=id;return new this.constructor(B);}});
+Roo.extend(Roo.Component,Roo.util.Observable,{hidden:false,disabled:false,rendered:false,disabledClass:"x-item-disabled",allowDomMove:true,hideMode:'display',ctype:"Roo.Component",actionMode:"el",style:false,getActionEl:function(){return this[this.actionMode];
+},initComponent:Roo.emptyFn,render:function(A,B){if(this.rendered){return this;}if(this.fireEvent("beforerender",this)===false){return false;}if(!A&&this.el){this.el=Roo.get(this.el);A=this.el.dom.parentNode;this.allowDomMove=false;}this.container=Roo.get(A);
+this.rendered=true;if(B!==undefined){if(typeof B=='number'){B=this.container.dom.childNodes[B];}else{B=Roo.getDom(B);}}this.onRender(this.container,B||null);if(this.cls){this.el.addClass(this.cls);delete this.cls;}if(this.style){this.el.applyStyles(this.style);
+delete this.style;}this.fireEvent("render",this);this.afterRender(this.container);if(this.hidden){this.hide();}if(this.disabled){this.disable();}return this;},onRender:function(ct,A){if(this.el){this.el=Roo.get(this.el);if(this.allowDomMove!==false){ct.dom.insertBefore(this.el.dom,A);
+}}},getAutoCreate:function(){var A=typeof this.autoCreate=="object"?this.autoCreate:Roo.apply({},this.defaultAutoCreate);if(this.id&&!A.id){A.id=this.id;}return A;},afterRender:Roo.emptyFn,destroy:function(){if(this.fireEvent("beforedestroy",this)!==false){this.purgeListeners();
+this.beforeDestroy();if(this.rendered){this.el.removeAllListeners();this.el.remove();if(this.actionMode=="container"){this.container.remove();}}this.onDestroy();Roo.ComponentMgr.unregister(this);this.fireEvent("destroy",this);}},beforeDestroy:function(){}
+,onDestroy:function(){},getEl:function(){return this.el;},getId:function(){return this.id;},focus:function(A){if(this.rendered){this.el.focus();if(A===true){this.el.dom.select();}}return this;},blur:function(){if(this.rendered){this.el.blur();}return this;
+},disable:function(){if(this.rendered){this.onDisable();}this.disabled=true;this.fireEvent("disable",this);return this;},onDisable:function(){this.getActionEl().addClass(this.disabledClass);this.el.dom.disabled=true;},enable:function(){if(this.rendered){this.onEnable();
+}this.disabled=false;this.fireEvent("enable",this);return this;},onEnable:function(){this.getActionEl().removeClass(this.disabledClass);this.el.dom.disabled=false;},setDisabled:function(A){this[A?"disable":"enable"]();},show:function(){if(this.fireEvent("beforeshow",this)!==false){this.hidden=false;
+if(this.rendered){this.onShow();}this.fireEvent("show",this);}return this;},onShow:function(){var ae=this.getActionEl();if(this.hideMode=='visibility'){ae.dom.style.visibility="visible";}else if(this.hideMode=='offsets'){ae.removeClass('x-hidden');}else{ae.dom.style.display="";
+}},hide:function(){if(this.fireEvent("beforehide",this)!==false){this.hidden=true;if(this.rendered){this.onHide();}this.fireEvent("hide",this);}return this;},onHide:function(){var ae=this.getActionEl();if(this.hideMode=='visibility'){ae.dom.style.visibility="hidden";
+}else if(this.hideMode=='offsets'){ae.addClass('x-hidden');}else{ae.dom.style.display="none";}},setVisible:function(A){if(A){this.show();}else{this.hide();}return this;},isVisible:function(){return this.getActionEl().isVisible();},cloneConfig:function(A){A=A||{}
+;var id=A.id||Roo.id();var B=Roo.applyIf(A,this.initialConfig);B.id=id;return new this.constructor(B);}});
// Roo/BoxComponent.js
Roo.BoxComponent=function(A){Roo.Component.call(this,A);this.addEvents({resize:true,move:true});};Roo.extend(Roo.BoxComponent,Roo.Component,{boxReady:false,deferHeight:false,setSize:function(w,h){if(typeof w=='object'){h=w.height;w=w.width;}if(!this.boxReady){this.width=w;
this.height=h;return this;}if(this.lastSize&&this.lastSize.width==w&&this.lastSize.height==h){return this;}this.lastSize={width:w,height:h};var A=this.adjustSize(w,h);var aw=A.width,ah=A.height;if(aw!==undefined||ah!==undefined){var rz=this.getResizeEl();
}C.push(F);});A.className=C.length?C.join(' '):'';if(!C.length){A.removeAttribute("class");}}if(A.hasAttribute("lang")){A.removeAttribute("lang");}if(A.hasAttribute("style")){var D=A.getAttribute("style").split(";");var E=[];Roo.each(D,function(s){if(!s.match(/:/)){return;
}var kv=s.split(":");if(kv[0].match(/^(mso-|line|font|background|margin|padding|color)/)){return;}E.push(s);});A.setAttribute("style",E.length?E.join(';'):'');if(!E.length){A.removeAttribute('style');}}return true;},styleToObject:function(A){var B=(A.getAttribute("style")||'').split(";");
var C={};Roo.each(B,function(s){if(!s.match(/:/)){return;}var kv=s.split(":");C[kv[0].trim()]=kv[1];});return C;},replaceAname:function(A){var aa=Array.from(A.getElementsByTagName('a'));for(var i=0;i<aa.length;i++){var a=aa[i];if(a.hasAttribute("name")){a.removeAttribute("name");
-}if(a.hasAttribute("href")){continue;}this.removeNodeKeepChildren(a);}},replaceDocBullets:function(A){var B=A.getElementsByClassName('MsoListParagraphCxSpFirst');for(var i=0;i<B.length;i++){B.item(i).className="MsoListParagraph";}B=A.getElementsByClassName('MsoListParagraphCxSpMiddle');
-for(var i=0;i<B.length;i++){B.item(i).className="MsoListParagraph";}B=A.getElementsByClassName('MsoListParagraphCxSpLast');for(var i=0;i<B.length;i++){B.item(i).className="MsoListParagraph";}B=A.getElementsByClassName('ql-indent-1');for(var i=0;i<B.length;
-i++){B.item(i).className="MsoListParagraph";}var C=A.getElementsByTagName('h2');for(var i=0;i<C.length;i++){if(C.item(i).hasAttribute('style')&&C.item(i).getAttribute('style').match(/mso-list:/)){C.item(i).className="MsoListParagraph";}}B=A.getElementsByClassName('MsoNormal');
-while(B.length){if(B.item(0).hasAttribute('style')&&B.item(0).getAttribute('style').match(/mso-list:/)){B.item(0).className="MsoListParagraph";}else{B.item(0).className="MsoNormalx";}}B=A.getElementsByClassName('MsoListParagraph');while(B.length){this.replaceDocBullet(B.item(0));
+}if(a.hasAttribute("href")){continue;}this.removeNodeKeepChildren(a);}},replaceDocBullets:function(A){var B=Array.from(A.getElementsByClassName('MsoListParagraphCxSpFirst'));for(var i=0;i<B.length;i++){B[i].className="MsoListParagraph";}B=Array.from(A.getElementsByClassName('MsoListParagraphCxSpMiddle'));
+for(var i=0;i<B.length;i++){B[i].className="MsoListParagraph";}B=Array.from(A.getElementsByClassName('MsoListParagraphCxSpLast'));for(var i=0;i<B.length;i++){B[i].className="MsoListParagraph";}B=Array.from(A.getElementsByClassName('ql-indent-1'));for(var i=0;
+i<B.length;i++){B[i].className="MsoListParagraph";}var C=Array.from(A.getElementsByTagName('h2'));for(var i=0;i<C.length;i++){if(C[i].hasAttribute('style')&&C[i].getAttribute('style').match(/mso-list:/)){C[i].className="MsoListParagraph";}}B=Array.from(A.getElementsByClassName('MsoNormal'));
+for(var i=0;i<B.length;i++){if(B[i].hasAttribute('style')&&B[i].getAttribute('style').match(/mso-list:/)){B[i].className="MsoListParagraph";}else{B[i].className="MsoNormalx";}}B=A.getElementsByClassName('MsoListParagraph');while(B.length){this.replaceDocBullet(B.item(0));
}},replaceDocBullet:function(p){var ns=p,A=p.parentNode,B=A.ownerDocument,C=[];var D='ul';while(ns){if(ns.nodeType!=1){ns=ns.nextSibling;continue;}if(!ns.className.match(/(MsoListParagraph|ql-indent-1)/i)){break;}var E=ns.getElementsByTagName('span');if(ns.hasAttribute('style')&&ns.getAttribute('style').match(/mso-list/)){C.push(ns);
ns=ns.nextSibling;G=true;if(E.length&&E[0].hasAttribute('style')){var F=this.styleToObject(E[0]);if(typeof(F['font-family'])!='undefined'&&!F['font-family'].match(/Symbol/)){D='ol';}}continue;}var E=ns.getElementsByTagName('span');if(!E.length){break;}var G=false;
for(var i=0;i<E.length;i++){if(E[i].hasAttribute('style')&&E[i].getAttribute('style').match(/mso-list/)){G=true;break;}}if(!G){break;}C.push(ns);ns=ns.nextSibling;}if(!C.length){ns.className="";return;}var ul=A.ownerDocument.createElement(D);A.insertBefore(ul,p);
var H=0;var I=[ul];var J=false;var K={};max_margins=-1;C.forEach(function(n,L){var M=n.getElementsByTagName('span');if(!M.length){A.removeChild(n);return;}var N=1;var O={};for(var i=0;i<M.length;i++){O=this.styleToObject(M[i]);if(typeof(O['mso-list'])=='undefined'){continue;
}if(D=='ol'){N=M[i].innerText.replace(/[^0-9]+]/g,'')*1;}M[i].parentNode.removeChild(M[i]);break;}O=this.styleToObject(n);if(typeof(O['mso-list'])=='undefined'){A.removeChild(n);return;}var P=O['margin-left'];if(typeof(K[P])=='undefined'){max_margins++;K[P]=max_margins;
-}nlvl=K[P];if(nlvl>H){var Q=B.createElement(D);if(!J){J=B.createElement('li');I[H].appendChild(J);}J.appendChild(Q);I[nlvl]=Q;}H=nlvl;if(!I[nlvl].hasAttribute("start")&&N>1){I[nlvl].setAttribute("start",N);}var R=I[nlvl].appendChild(B.createElement('li'));
+}nlvl=K[P];if(nlvl>H){var Q=B.createElement(D);if(!J){J=B.createElement('li');I[H].appendChild(J);}J.appendChild(Q);I[nlvl]=Q;}H=nlvl;if(!I[nlvl].hasAttribute("start")&&D=="ol"){I[nlvl].setAttribute("start",N);}var R=I[nlvl].appendChild(B.createElement('li'));
J=R;R.innerHTML=n.innerHTML;A.removeChild(n);},this);}});
// Roo/htmleditor/FilterStyleToTag.js
Roo.htmleditor.FilterStyleToTag=function(A){this.tags={B:['fontWeight','bold'],I:['fontStyle','italic'],SUP:['verticalAlign','super'],SUB:['verticalAlign','sub']};Roo.apply(this,A);this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterStyleToTag,Roo.htmleditor.Filter,{tag:true,tags:false,replaceTag:function(A){if(A.getAttribute("style")===null){return true;
}}},toggleSourceEdit:function(A){this.sourceEditMode=A===true;if(this.sourceEditMode){Roo.get(this.iframe).addClass(['x-hidden','hide','d-none']);}else{Roo.get(this.iframe).removeClass(['x-hidden','hide','d-none']);this.deferFocus();}},cleanHtml:function(A){A=String(A);
if(A.length>5){if(Roo.isSafari){A=A.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,'');}}if(A==' '){A='';}return A;},syncValue:function(){if(this.initialized){if(this.undoManager){this.undoManager.addEvent();}var bd=(this.doc.body||this.doc.documentElement);
var A=this.win.getSelection();var B=document.createElement('div');B.innerHTML=bd.innerHTML;var C=B.getElementsByClassName('gtx-trans-icon');if(C.length>0){var rm=C.item(0).parentNode;rm.parentNode.removeChild(rm);}if(this.enableBlocks){new Roo.htmleditor.FilterBlock({node:B}
-);}var D=new Roo.htmleditor.TidySerializer({inner:true});var E=D.serialize(B);if(Roo.isSafari){var bs=bd.getAttribute('style');var m=bs?bs.match(/text-align:(.*?);/i):false;if(m&&m[1]){E='<div style="'+m[0]+'">'+E+'</div>';}}E=this.cleanHtml(E);E=E.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,E)!==false){this.el.dom.value=E;
-this.owner.fireEvent('sync',this,E);}}},pushValue:function(){if(this.initialized){var v=this.el.dom.value.trim();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;
+);}var D=B.innerHTML;if(this.autoClean){new Roo.htmleditor.FilterAttributes({node:B,attrib_white:['href','src','name','align','colspan','rowspan','data-display','data-width','start','style','class','allowfullscreen','frameborder','width','height','alt'],attrib_clean:['href','src']}
+);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(){if(this.initialized){var v=this.el.dom.value.trim();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});}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 is a bit odd - but it appears some indents use ql-indent-1
//Roo.log(doc.innerHTML);
- var listpara = doc.getElementsByClassName('MsoListParagraphCxSpFirst');
+ var listpara = Array.from(doc.getElementsByClassName('MsoListParagraphCxSpFirst'));
for( var i = 0; i < listpara.length; i ++) {
- listpara.item(i).className = "MsoListParagraph";
+ listpara[i].className = "MsoListParagraph";
}
- listpara = doc.getElementsByClassName('MsoListParagraphCxSpMiddle');
+ listpara = Array.from(doc.getElementsByClassName('MsoListParagraphCxSpMiddle'));
for( var i = 0; i < listpara.length; i ++) {
- listpara.item(i).className = "MsoListParagraph";
+ listpara[i].className = "MsoListParagraph";
}
- listpara = doc.getElementsByClassName('MsoListParagraphCxSpLast');
+ listpara = Array.from(doc.getElementsByClassName('MsoListParagraphCxSpLast'));
for( var i = 0; i < listpara.length; i ++) {
- listpara.item(i).className = "MsoListParagraph";
+ listpara[i].className = "MsoListParagraph";
}
- listpara = doc.getElementsByClassName('ql-indent-1');
+ listpara = Array.from(doc.getElementsByClassName('ql-indent-1'));
for( var i = 0; i < listpara.length; i ++) {
- listpara.item(i).className = "MsoListParagraph";
+ listpara[i].className = "MsoListParagraph";
}
// this is a bit hacky - we had one word document where h2 had a miso-list attribute.
- var htwo = doc.getElementsByTagName('h2');
+ var htwo = Array.from(doc.getElementsByTagName('h2'));
for( var i = 0; i < htwo.length; i ++) {
- if (htwo.item(i).hasAttribute('style') && htwo.item(i).getAttribute('style').match(/mso-list:/)) {
- htwo.item(i).className = "MsoListParagraph";
+ if (htwo[i].hasAttribute('style') && htwo[i].getAttribute('style').match(/mso-list:/)) {
+ htwo[i].className = "MsoListParagraph";
}
}
- listpara = doc.getElementsByClassName('MsoNormal');
- while(listpara.length) {
- if (listpara.item(0).hasAttribute('style') && listpara.item(0).getAttribute('style').match(/mso-list:/)) {
- listpara.item(0).className = "MsoListParagraph";
+ listpara = Array.from(doc.getElementsByClassName('MsoNormal'));
+ for( var i = 0; i < listpara.length; i ++) {
+ if (listpara[i].hasAttribute('style') && listpara[i].getAttribute('style').match(/mso-list:/)) {
+ listpara[i].className = "MsoListParagraph";
} else {
- listpara.item(0).className = "MsoNormalx";
+ listpara[i].className = "MsoNormalx";
}
}
listpara = doc.getElementsByClassName('MsoListParagraph');
+ // Roo.log(doc.innerHTML);
- //Roo.log(doc.innerHTML);
while(listpara.length) {
lvl = nlvl;
// not starting at 1..
- if (!stack[nlvl].hasAttribute("start") && num > 1) {
+ if (!stack[nlvl].hasAttribute("start") && listtype == "ol") {
stack[nlvl].setAttribute("start", num);
}
if (this.enableBlocks) {
new Roo.htmleditor.FilterBlock({ node : div });
}
+
+ var html = div.innerHTML;
+
//?? tidy?
- var tidy = new Roo.htmleditor.TidySerializer({
- inner: true
- });
- var html = tidy.serialize(div);
+ if (this.autoClean) {
+
+ new Roo.htmleditor.FilterAttributes({
+ node : div,
+ attrib_white : [
+ 'href',
+ 'src',
+ 'name',
+ 'align',
+ 'colspan',
+ 'rowspan',
+ 'data-display',
+ 'data-width',
+ 'start' ,
+ 'style',
+ // youtube embed.
+ 'class',
+ 'allowfullscreen',
+ 'frameborder',
+ 'width',
+ 'height',
+ 'alt'
+ ],
+ attrib_clean : ['href', 'src' ]
+ });
+
+ var tidy = new Roo.htmleditor.TidySerializer({
+ inner: true
+ });
+ html = tidy.serialize(div);
+
+ }
if(Roo.isSafari){
}C.push(F);});A.className=C.length?C.join(' '):'';if(!C.length){A.removeAttribute("class");}}if(A.hasAttribute("lang")){A.removeAttribute("lang");}if(A.hasAttribute("style")){var D=A.getAttribute("style").split(";");var E=[];Roo.each(D,function(s){if(!s.match(/:/)){return;
}var kv=s.split(":");if(kv[0].match(/^(mso-|line|font|background|margin|padding|color)/)){return;}E.push(s);});A.setAttribute("style",E.length?E.join(';'):'');if(!E.length){A.removeAttribute('style');}}return true;},styleToObject:function(A){var B=(A.getAttribute("style")||'').split(";");
var C={};Roo.each(B,function(s){if(!s.match(/:/)){return;}var kv=s.split(":");C[kv[0].trim()]=kv[1];});return C;},replaceAname:function(A){var aa=Array.from(A.getElementsByTagName('a'));for(var i=0;i<aa.length;i++){var a=aa[i];if(a.hasAttribute("name")){a.removeAttribute("name");
-}if(a.hasAttribute("href")){continue;}this.removeNodeKeepChildren(a);}},replaceDocBullets:function(A){var B=A.getElementsByClassName('MsoListParagraphCxSpFirst');for(var i=0;i<B.length;i++){B.item(i).className="MsoListParagraph";}B=A.getElementsByClassName('MsoListParagraphCxSpMiddle');
-for(var i=0;i<B.length;i++){B.item(i).className="MsoListParagraph";}B=A.getElementsByClassName('MsoListParagraphCxSpLast');for(var i=0;i<B.length;i++){B.item(i).className="MsoListParagraph";}B=A.getElementsByClassName('ql-indent-1');for(var i=0;i<B.length;
-i++){B.item(i).className="MsoListParagraph";}var C=A.getElementsByTagName('h2');for(var i=0;i<C.length;i++){if(C.item(i).hasAttribute('style')&&C.item(i).getAttribute('style').match(/mso-list:/)){C.item(i).className="MsoListParagraph";}}B=A.getElementsByClassName('MsoNormal');
-while(B.length){if(B.item(0).hasAttribute('style')&&B.item(0).getAttribute('style').match(/mso-list:/)){B.item(0).className="MsoListParagraph";}else{B.item(0).className="MsoNormalx";}}B=A.getElementsByClassName('MsoListParagraph');while(B.length){this.replaceDocBullet(B.item(0));
+}if(a.hasAttribute("href")){continue;}this.removeNodeKeepChildren(a);}},replaceDocBullets:function(A){var B=Array.from(A.getElementsByClassName('MsoListParagraphCxSpFirst'));for(var i=0;i<B.length;i++){B[i].className="MsoListParagraph";}B=Array.from(A.getElementsByClassName('MsoListParagraphCxSpMiddle'));
+for(var i=0;i<B.length;i++){B[i].className="MsoListParagraph";}B=Array.from(A.getElementsByClassName('MsoListParagraphCxSpLast'));for(var i=0;i<B.length;i++){B[i].className="MsoListParagraph";}B=Array.from(A.getElementsByClassName('ql-indent-1'));for(var i=0;
+i<B.length;i++){B[i].className="MsoListParagraph";}var C=Array.from(A.getElementsByTagName('h2'));for(var i=0;i<C.length;i++){if(C[i].hasAttribute('style')&&C[i].getAttribute('style').match(/mso-list:/)){C[i].className="MsoListParagraph";}}B=Array.from(A.getElementsByClassName('MsoNormal'));
+for(var i=0;i<B.length;i++){if(B[i].hasAttribute('style')&&B[i].getAttribute('style').match(/mso-list:/)){B[i].className="MsoListParagraph";}else{B[i].className="MsoNormalx";}}B=A.getElementsByClassName('MsoListParagraph');while(B.length){this.replaceDocBullet(B.item(0));
}},replaceDocBullet:function(p){var ns=p,A=p.parentNode,B=A.ownerDocument,C=[];var D='ul';while(ns){if(ns.nodeType!=1){ns=ns.nextSibling;continue;}if(!ns.className.match(/(MsoListParagraph|ql-indent-1)/i)){break;}var E=ns.getElementsByTagName('span');if(ns.hasAttribute('style')&&ns.getAttribute('style').match(/mso-list/)){C.push(ns);
ns=ns.nextSibling;G=true;if(E.length&&E[0].hasAttribute('style')){var F=this.styleToObject(E[0]);if(typeof(F['font-family'])!='undefined'&&!F['font-family'].match(/Symbol/)){D='ol';}}continue;}var E=ns.getElementsByTagName('span');if(!E.length){break;}var G=false;
for(var i=0;i<E.length;i++){if(E[i].hasAttribute('style')&&E[i].getAttribute('style').match(/mso-list/)){G=true;break;}}if(!G){break;}C.push(ns);ns=ns.nextSibling;}if(!C.length){ns.className="";return;}var ul=A.ownerDocument.createElement(D);A.insertBefore(ul,p);
var H=0;var I=[ul];var J=false;var K={};max_margins=-1;C.forEach(function(n,L){var M=n.getElementsByTagName('span');if(!M.length){A.removeChild(n);return;}var N=1;var O={};for(var i=0;i<M.length;i++){O=this.styleToObject(M[i]);if(typeof(O['mso-list'])=='undefined'){continue;
}if(D=='ol'){N=M[i].innerText.replace(/[^0-9]+]/g,'')*1;}M[i].parentNode.removeChild(M[i]);break;}O=this.styleToObject(n);if(typeof(O['mso-list'])=='undefined'){A.removeChild(n);return;}var P=O['margin-left'];if(typeof(K[P])=='undefined'){max_margins++;K[P]=max_margins;
-}nlvl=K[P];if(nlvl>H){var Q=B.createElement(D);if(!J){J=B.createElement('li');I[H].appendChild(J);}J.appendChild(Q);I[nlvl]=Q;}H=nlvl;if(!I[nlvl].hasAttribute("start")&&N>1){I[nlvl].setAttribute("start",N);}var R=I[nlvl].appendChild(B.createElement('li'));
+}nlvl=K[P];if(nlvl>H){var Q=B.createElement(D);if(!J){J=B.createElement('li');I[H].appendChild(J);}J.appendChild(Q);I[nlvl]=Q;}H=nlvl;if(!I[nlvl].hasAttribute("start")&&D=="ol"){I[nlvl].setAttribute("start",N);}var R=I[nlvl].appendChild(B.createElement('li'));
J=R;R.innerHTML=n.innerHTML;A.removeChild(n);},this);}});
// Roo/htmleditor/FilterStyleToTag.js
Roo.htmleditor.FilterStyleToTag=function(A){this.tags={B:['fontWeight','bold'],I:['fontStyle','italic'],SUP:['verticalAlign','super'],SUB:['verticalAlign','sub']};Roo.apply(this,A);this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterStyleToTag,Roo.htmleditor.Filter,{tag:true,tags:false,replaceTag:function(A){if(A.getAttribute("style")===null){return true;
}}},toggleSourceEdit:function(A){this.sourceEditMode=A===true;if(this.sourceEditMode){Roo.get(this.iframe).addClass(['x-hidden','hide','d-none']);}else{Roo.get(this.iframe).removeClass(['x-hidden','hide','d-none']);this.deferFocus();}},cleanHtml:function(A){A=String(A);
if(A.length>5){if(Roo.isSafari){A=A.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,'');}}if(A==' '){A='';}return A;},syncValue:function(){if(this.initialized){if(this.undoManager){this.undoManager.addEvent();}var bd=(this.doc.body||this.doc.documentElement);
var A=this.win.getSelection();var B=document.createElement('div');B.innerHTML=bd.innerHTML;var C=B.getElementsByClassName('gtx-trans-icon');if(C.length>0){var rm=C.item(0).parentNode;rm.parentNode.removeChild(rm);}if(this.enableBlocks){new Roo.htmleditor.FilterBlock({node:B}
-);}var D=new Roo.htmleditor.TidySerializer({inner:true});var E=D.serialize(B);if(Roo.isSafari){var bs=bd.getAttribute('style');var m=bs?bs.match(/text-align:(.*?);/i):false;if(m&&m[1]){E='<div style="'+m[0]+'">'+E+'</div>';}}E=this.cleanHtml(E);E=E.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,E)!==false){this.el.dom.value=E;
-this.owner.fireEvent('sync',this,E);}}},pushValue:function(){if(this.initialized){var v=this.el.dom.value.trim();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;
+);}var D=B.innerHTML;if(this.autoClean){new Roo.htmleditor.FilterAttributes({node:B,attrib_white:['href','src','name','align','colspan','rowspan','data-display','data-width','start','style','class','allowfullscreen','frameborder','width','height','alt'],attrib_clean:['href','src']}
+);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(){if(this.initialized){var v=this.el.dom.value.trim();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});}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);
*/
actionMode : "el",
+ /**
+ * @cfg {String} style
+ * css styles to add to component
+ * eg. text-align:right;
+ */
+ style : false,
+
/** @private */
getActionEl : function(){
return this[this.actionMode];
// Roo/Component.js
Roo.Component=function(A){A=A||{};if(A.tagName||A.dom||typeof A=="string"){A={el:A,id:A.id||A};}this.initialConfig=A;Roo.apply(this,A);this.addEvents({disable:true,enable:true,beforeshow:true,show:true,beforehide:true,hide:true,beforerender:true,render:true,beforedestroy:true,destroy:true}
);if(!this.id){this.id="roo-comp-"+(++Roo.Component.AUTO_ID);}Roo.ComponentMgr.register(this);Roo.Component.superclass.constructor.call(this);this.initComponent();if(this.renderTo){this.render(this.renderTo);delete this.renderTo;}};Roo.Component.AUTO_ID=1000;
-Roo.extend(Roo.Component,Roo.util.Observable,{hidden:false,disabled:false,rendered:false,disabledClass:"x-item-disabled",allowDomMove:true,hideMode:'display',ctype:"Roo.Component",actionMode:"el",getActionEl:function(){return this[this.actionMode];},initComponent:Roo.emptyFn,render:function(A,B){if(this.rendered){return this;
-}if(this.fireEvent("beforerender",this)===false){return false;}if(!A&&this.el){this.el=Roo.get(this.el);A=this.el.dom.parentNode;this.allowDomMove=false;}this.container=Roo.get(A);this.rendered=true;if(B!==undefined){if(typeof B=='number'){B=this.container.dom.childNodes[B];
-}else{B=Roo.getDom(B);}}this.onRender(this.container,B||null);if(this.cls){this.el.addClass(this.cls);delete this.cls;}if(this.style){this.el.applyStyles(this.style);delete this.style;}this.fireEvent("render",this);this.afterRender(this.container);if(this.hidden){this.hide();
-}if(this.disabled){this.disable();}return this;},onRender:function(ct,A){if(this.el){this.el=Roo.get(this.el);if(this.allowDomMove!==false){ct.dom.insertBefore(this.el.dom,A);}}},getAutoCreate:function(){var A=typeof this.autoCreate=="object"?this.autoCreate:Roo.apply({}
-,this.defaultAutoCreate);if(this.id&&!A.id){A.id=this.id;}return A;},afterRender:Roo.emptyFn,destroy:function(){if(this.fireEvent("beforedestroy",this)!==false){this.purgeListeners();this.beforeDestroy();if(this.rendered){this.el.removeAllListeners();this.el.remove();
-if(this.actionMode=="container"){this.container.remove();}}this.onDestroy();Roo.ComponentMgr.unregister(this);this.fireEvent("destroy",this);}},beforeDestroy:function(){},onDestroy:function(){},getEl:function(){return this.el;},getId:function(){return this.id;
-},focus:function(A){if(this.rendered){this.el.focus();if(A===true){this.el.dom.select();}}return this;},blur:function(){if(this.rendered){this.el.blur();}return this;},disable:function(){if(this.rendered){this.onDisable();}this.disabled=true;this.fireEvent("disable",this);
-return this;},onDisable:function(){this.getActionEl().addClass(this.disabledClass);this.el.dom.disabled=true;},enable:function(){if(this.rendered){this.onEnable();}this.disabled=false;this.fireEvent("enable",this);return this;},onEnable:function(){this.getActionEl().removeClass(this.disabledClass);
-this.el.dom.disabled=false;},setDisabled:function(A){this[A?"disable":"enable"]();},show:function(){if(this.fireEvent("beforeshow",this)!==false){this.hidden=false;if(this.rendered){this.onShow();}this.fireEvent("show",this);}return this;},onShow:function(){var ae=this.getActionEl();
-if(this.hideMode=='visibility'){ae.dom.style.visibility="visible";}else if(this.hideMode=='offsets'){ae.removeClass('x-hidden');}else{ae.dom.style.display="";}},hide:function(){if(this.fireEvent("beforehide",this)!==false){this.hidden=true;if(this.rendered){this.onHide();
-}this.fireEvent("hide",this);}return this;},onHide:function(){var ae=this.getActionEl();if(this.hideMode=='visibility'){ae.dom.style.visibility="hidden";}else if(this.hideMode=='offsets'){ae.addClass('x-hidden');}else{ae.dom.style.display="none";}},setVisible:function(A){if(A){this.show();
-}else{this.hide();}return this;},isVisible:function(){return this.getActionEl().isVisible();},cloneConfig:function(A){A=A||{};var id=A.id||Roo.id();var B=Roo.applyIf(A,this.initialConfig);B.id=id;return new this.constructor(B);}});
+Roo.extend(Roo.Component,Roo.util.Observable,{hidden:false,disabled:false,rendered:false,disabledClass:"x-item-disabled",allowDomMove:true,hideMode:'display',ctype:"Roo.Component",actionMode:"el",style:false,getActionEl:function(){return this[this.actionMode];
+},initComponent:Roo.emptyFn,render:function(A,B){if(this.rendered){return this;}if(this.fireEvent("beforerender",this)===false){return false;}if(!A&&this.el){this.el=Roo.get(this.el);A=this.el.dom.parentNode;this.allowDomMove=false;}this.container=Roo.get(A);
+this.rendered=true;if(B!==undefined){if(typeof B=='number'){B=this.container.dom.childNodes[B];}else{B=Roo.getDom(B);}}this.onRender(this.container,B||null);if(this.cls){this.el.addClass(this.cls);delete this.cls;}if(this.style){this.el.applyStyles(this.style);
+delete this.style;}this.fireEvent("render",this);this.afterRender(this.container);if(this.hidden){this.hide();}if(this.disabled){this.disable();}return this;},onRender:function(ct,A){if(this.el){this.el=Roo.get(this.el);if(this.allowDomMove!==false){ct.dom.insertBefore(this.el.dom,A);
+}}},getAutoCreate:function(){var A=typeof this.autoCreate=="object"?this.autoCreate:Roo.apply({},this.defaultAutoCreate);if(this.id&&!A.id){A.id=this.id;}return A;},afterRender:Roo.emptyFn,destroy:function(){if(this.fireEvent("beforedestroy",this)!==false){this.purgeListeners();
+this.beforeDestroy();if(this.rendered){this.el.removeAllListeners();this.el.remove();if(this.actionMode=="container"){this.container.remove();}}this.onDestroy();Roo.ComponentMgr.unregister(this);this.fireEvent("destroy",this);}},beforeDestroy:function(){}
+,onDestroy:function(){},getEl:function(){return this.el;},getId:function(){return this.id;},focus:function(A){if(this.rendered){this.el.focus();if(A===true){this.el.dom.select();}}return this;},blur:function(){if(this.rendered){this.el.blur();}return this;
+},disable:function(){if(this.rendered){this.onDisable();}this.disabled=true;this.fireEvent("disable",this);return this;},onDisable:function(){this.getActionEl().addClass(this.disabledClass);this.el.dom.disabled=true;},enable:function(){if(this.rendered){this.onEnable();
+}this.disabled=false;this.fireEvent("enable",this);return this;},onEnable:function(){this.getActionEl().removeClass(this.disabledClass);this.el.dom.disabled=false;},setDisabled:function(A){this[A?"disable":"enable"]();},show:function(){if(this.fireEvent("beforeshow",this)!==false){this.hidden=false;
+if(this.rendered){this.onShow();}this.fireEvent("show",this);}return this;},onShow:function(){var ae=this.getActionEl();if(this.hideMode=='visibility'){ae.dom.style.visibility="visible";}else if(this.hideMode=='offsets'){ae.removeClass('x-hidden');}else{ae.dom.style.display="";
+}},hide:function(){if(this.fireEvent("beforehide",this)!==false){this.hidden=true;if(this.rendered){this.onHide();}this.fireEvent("hide",this);}return this;},onHide:function(){var ae=this.getActionEl();if(this.hideMode=='visibility'){ae.dom.style.visibility="hidden";
+}else if(this.hideMode=='offsets'){ae.addClass('x-hidden');}else{ae.dom.style.display="none";}},setVisible:function(A){if(A){this.show();}else{this.hide();}return this;},isVisible:function(){return this.getActionEl().isVisible();},cloneConfig:function(A){A=A||{}
+;var id=A.id||Roo.id();var B=Roo.applyIf(A,this.initialConfig);B.id=id;return new this.constructor(B);}});
// Roo/BoxComponent.js
Roo.BoxComponent=function(A){Roo.Component.call(this,A);this.addEvents({resize:true,move:true});};Roo.extend(Roo.BoxComponent,Roo.Component,{boxReady:false,deferHeight:false,setSize:function(w,h){if(typeof w=='object'){h=w.height;w=w.width;}if(!this.boxReady){this.width=w;
this.height=h;return this;}if(this.lastSize&&this.lastSize.width==w&&this.lastSize.height==h){return this;}this.lastSize={width:w,height:h};var A=this.adjustSize(w,h);var aw=A.width,ah=A.height;if(aw!==undefined||ah!==undefined){var rz=this.getResizeEl();
*/
actionMode : "el",
+ /**
+ * @cfg {String} style
+ * css styles to add to component
+ * eg. text-align:right;
+ */
+ style : false,
+
/** @private */
getActionEl : function(){
return this[this.actionMode];
// this is a bit odd - but it appears some indents use ql-indent-1
//Roo.log(doc.innerHTML);
- var listpara = doc.getElementsByClassName('MsoListParagraphCxSpFirst');
+ var listpara = Array.from(doc.getElementsByClassName('MsoListParagraphCxSpFirst'));
for( var i = 0; i < listpara.length; i ++) {
- listpara.item(i).className = "MsoListParagraph";
+ listpara[i].className = "MsoListParagraph";
}
- listpara = doc.getElementsByClassName('MsoListParagraphCxSpMiddle');
+ listpara = Array.from(doc.getElementsByClassName('MsoListParagraphCxSpMiddle'));
for( var i = 0; i < listpara.length; i ++) {
- listpara.item(i).className = "MsoListParagraph";
+ listpara[i].className = "MsoListParagraph";
}
- listpara = doc.getElementsByClassName('MsoListParagraphCxSpLast');
+ listpara = Array.from(doc.getElementsByClassName('MsoListParagraphCxSpLast'));
for( var i = 0; i < listpara.length; i ++) {
- listpara.item(i).className = "MsoListParagraph";
+ listpara[i].className = "MsoListParagraph";
}
- listpara = doc.getElementsByClassName('ql-indent-1');
+ listpara = Array.from(doc.getElementsByClassName('ql-indent-1'));
for( var i = 0; i < listpara.length; i ++) {
- listpara.item(i).className = "MsoListParagraph";
+ listpara[i].className = "MsoListParagraph";
}
// this is a bit hacky - we had one word document where h2 had a miso-list attribute.
- var htwo = doc.getElementsByTagName('h2');
+ var htwo = Array.from(doc.getElementsByTagName('h2'));
for( var i = 0; i < htwo.length; i ++) {
- if (htwo.item(i).hasAttribute('style') && htwo.item(i).getAttribute('style').match(/mso-list:/)) {
- htwo.item(i).className = "MsoListParagraph";
+ if (htwo[i].hasAttribute('style') && htwo[i].getAttribute('style').match(/mso-list:/)) {
+ htwo[i].className = "MsoListParagraph";
}
}
- listpara = doc.getElementsByClassName('MsoNormal');
- while(listpara.length) {
- if (listpara.item(0).hasAttribute('style') && listpara.item(0).getAttribute('style').match(/mso-list:/)) {
- listpara.item(0).className = "MsoListParagraph";
+ listpara = Array.from(doc.getElementsByClassName('MsoNormal'));
+ for( var i = 0; i < listpara.length; i ++) {
+ if (listpara[i].hasAttribute('style') && listpara[i].getAttribute('style').match(/mso-list:/)) {
+ listpara[i].className = "MsoListParagraph";
} else {
- listpara.item(0).className = "MsoNormalx";
+ listpara[i].className = "MsoNormalx";
}
}
listpara = doc.getElementsByClassName('MsoListParagraph');
+ // Roo.log(doc.innerHTML);
- //Roo.log(doc.innerHTML);
while(listpara.length) {
lvl = nlvl;
// not starting at 1..
- if (!stack[nlvl].hasAttribute("start") && num > 1) {
+ if (!stack[nlvl].hasAttribute("start") && listtype == "ol") {
stack[nlvl].setAttribute("start", num);
}
if (this.enableBlocks) {
new Roo.htmleditor.FilterBlock({ node : div });
}
+
+ var html = div.innerHTML;
+
//?? tidy?
- var tidy = new Roo.htmleditor.TidySerializer({
- inner: true
- });
- var html = tidy.serialize(div);
+ if (this.autoClean) {
+
+ new Roo.htmleditor.FilterAttributes({
+ node : div,
+ attrib_white : [
+ 'href',
+ 'src',
+ 'name',
+ 'align',
+ 'colspan',
+ 'rowspan',
+ 'data-display',
+ 'data-width',
+ 'start' ,
+ 'style',
+ // youtube embed.
+ 'class',
+ 'allowfullscreen',
+ 'frameborder',
+ 'width',
+ 'height',
+ 'alt'
+ ],
+ attrib_clean : ['href', 'src' ]
+ });
+
+ var tidy = new Roo.htmleditor.TidySerializer({
+ inner: true
+ });
+ html = tidy.serialize(div);
+
+ }
if(Roo.isSafari){
// this is a bit odd - but it appears some indents use ql-indent-1
//Roo.log(doc.innerHTML);
- var listpara = doc.getElementsByClassName('MsoListParagraphCxSpFirst');
+ var listpara = Array.from(doc.getElementsByClassName('MsoListParagraphCxSpFirst'));
for( var i = 0; i < listpara.length; i ++) {
- listpara.item(i).className = "MsoListParagraph";
+ listpara[i].className = "MsoListParagraph";
}
- listpara = doc.getElementsByClassName('MsoListParagraphCxSpMiddle');
+ listpara = Array.from(doc.getElementsByClassName('MsoListParagraphCxSpMiddle'));
for( var i = 0; i < listpara.length; i ++) {
- listpara.item(i).className = "MsoListParagraph";
+ listpara[i].className = "MsoListParagraph";
}
- listpara = doc.getElementsByClassName('MsoListParagraphCxSpLast');
+ listpara = Array.from(doc.getElementsByClassName('MsoListParagraphCxSpLast'));
for( var i = 0; i < listpara.length; i ++) {
- listpara.item(i).className = "MsoListParagraph";
+ listpara[i].className = "MsoListParagraph";
}
- listpara = doc.getElementsByClassName('ql-indent-1');
+ listpara = Array.from(doc.getElementsByClassName('ql-indent-1'));
for( var i = 0; i < listpara.length; i ++) {
- listpara.item(i).className = "MsoListParagraph";
+ listpara[i].className = "MsoListParagraph";
}
// this is a bit hacky - we had one word document where h2 had a miso-list attribute.
- var htwo = doc.getElementsByTagName('h2');
+ var htwo = Array.from(doc.getElementsByTagName('h2'));
for( var i = 0; i < htwo.length; i ++) {
- if (htwo.item(i).hasAttribute('style') && htwo.item(i).getAttribute('style').match(/mso-list:/)) {
- htwo.item(i).className = "MsoListParagraph";
+ if (htwo[i].hasAttribute('style') && htwo[i].getAttribute('style').match(/mso-list:/)) {
+ htwo[i].className = "MsoListParagraph";
}
}
- listpara = doc.getElementsByClassName('MsoNormal');
- while(listpara.length) {
- if (listpara.item(0).hasAttribute('style') && listpara.item(0).getAttribute('style').match(/mso-list:/)) {
- listpara.item(0).className = "MsoListParagraph";
+ listpara = Array.from(doc.getElementsByClassName('MsoNormal'));
+ for( var i = 0; i < listpara.length; i ++) {
+ if (listpara[i].hasAttribute('style') && listpara[i].getAttribute('style').match(/mso-list:/)) {
+ listpara[i].className = "MsoListParagraph";
} else {
- listpara.item(0).className = "MsoNormalx";
+ listpara[i].className = "MsoNormalx";
}
}
listpara = doc.getElementsByClassName('MsoListParagraph');
+ // Roo.log(doc.innerHTML);
- //Roo.log(doc.innerHTML);
while(listpara.length) {
lvl = nlvl;
// not starting at 1..
- if (!stack[nlvl].hasAttribute("start") && num > 1) {
+ if (!stack[nlvl].hasAttribute("start") && listtype == "ol") {
stack[nlvl].setAttribute("start", num);
}
if (this.enableBlocks) {
new Roo.htmleditor.FilterBlock({ node : div });
}
+
+ var html = div.innerHTML;
+
//?? tidy?
- var tidy = new Roo.htmleditor.TidySerializer({
- inner: true
- });
- var html = tidy.serialize(div);
+ if (this.autoClean) {
+
+ new Roo.htmleditor.FilterAttributes({
+ node : div,
+ attrib_white : [
+ 'href',
+ 'src',
+ 'name',
+ 'align',
+ 'colspan',
+ 'rowspan',
+ 'data-display',
+ 'data-width',
+ 'start' ,
+ 'style',
+ // youtube embed.
+ 'class',
+ 'allowfullscreen',
+ 'frameborder',
+ 'width',
+ 'height',
+ 'alt'
+ ],
+ attrib_clean : ['href', 'src' ]
+ });
+
+ var tidy = new Roo.htmleditor.TidySerializer({
+ inner: true
+ });
+ html = tidy.serialize(div);
+
+ }
if(Roo.isSafari){
}C.push(F);});A.className=C.length?C.join(' '):'';if(!C.length){A.removeAttribute("class");}}if(A.hasAttribute("lang")){A.removeAttribute("lang");}if(A.hasAttribute("style")){var D=A.getAttribute("style").split(";");var E=[];Roo.each(D,function(s){if(!s.match(/:/)){return;
}var kv=s.split(":");if(kv[0].match(/^(mso-|line|font|background|margin|padding|color)/)){return;}E.push(s);});A.setAttribute("style",E.length?E.join(';'):'');if(!E.length){A.removeAttribute('style');}}return true;},styleToObject:function(A){var B=(A.getAttribute("style")||'').split(";");
var C={};Roo.each(B,function(s){if(!s.match(/:/)){return;}var kv=s.split(":");C[kv[0].trim()]=kv[1];});return C;},replaceAname:function(A){var aa=Array.from(A.getElementsByTagName('a'));for(var i=0;i<aa.length;i++){var a=aa[i];if(a.hasAttribute("name")){a.removeAttribute("name");
-}if(a.hasAttribute("href")){continue;}this.removeNodeKeepChildren(a);}},replaceDocBullets:function(A){var B=A.getElementsByClassName('MsoListParagraphCxSpFirst');for(var i=0;i<B.length;i++){B.item(i).className="MsoListParagraph";}B=A.getElementsByClassName('MsoListParagraphCxSpMiddle');
-for(var i=0;i<B.length;i++){B.item(i).className="MsoListParagraph";}B=A.getElementsByClassName('MsoListParagraphCxSpLast');for(var i=0;i<B.length;i++){B.item(i).className="MsoListParagraph";}B=A.getElementsByClassName('ql-indent-1');for(var i=0;i<B.length;
-i++){B.item(i).className="MsoListParagraph";}var C=A.getElementsByTagName('h2');for(var i=0;i<C.length;i++){if(C.item(i).hasAttribute('style')&&C.item(i).getAttribute('style').match(/mso-list:/)){C.item(i).className="MsoListParagraph";}}B=A.getElementsByClassName('MsoNormal');
-while(B.length){if(B.item(0).hasAttribute('style')&&B.item(0).getAttribute('style').match(/mso-list:/)){B.item(0).className="MsoListParagraph";}else{B.item(0).className="MsoNormalx";}}B=A.getElementsByClassName('MsoListParagraph');while(B.length){this.replaceDocBullet(B.item(0));
+}if(a.hasAttribute("href")){continue;}this.removeNodeKeepChildren(a);}},replaceDocBullets:function(A){var B=Array.from(A.getElementsByClassName('MsoListParagraphCxSpFirst'));for(var i=0;i<B.length;i++){B[i].className="MsoListParagraph";}B=Array.from(A.getElementsByClassName('MsoListParagraphCxSpMiddle'));
+for(var i=0;i<B.length;i++){B[i].className="MsoListParagraph";}B=Array.from(A.getElementsByClassName('MsoListParagraphCxSpLast'));for(var i=0;i<B.length;i++){B[i].className="MsoListParagraph";}B=Array.from(A.getElementsByClassName('ql-indent-1'));for(var i=0;
+i<B.length;i++){B[i].className="MsoListParagraph";}var C=Array.from(A.getElementsByTagName('h2'));for(var i=0;i<C.length;i++){if(C[i].hasAttribute('style')&&C[i].getAttribute('style').match(/mso-list:/)){C[i].className="MsoListParagraph";}}B=Array.from(A.getElementsByClassName('MsoNormal'));
+for(var i=0;i<B.length;i++){if(B[i].hasAttribute('style')&&B[i].getAttribute('style').match(/mso-list:/)){B[i].className="MsoListParagraph";}else{B[i].className="MsoNormalx";}}B=A.getElementsByClassName('MsoListParagraph');while(B.length){this.replaceDocBullet(B.item(0));
}},replaceDocBullet:function(p){var ns=p,A=p.parentNode,B=A.ownerDocument,C=[];var D='ul';while(ns){if(ns.nodeType!=1){ns=ns.nextSibling;continue;}if(!ns.className.match(/(MsoListParagraph|ql-indent-1)/i)){break;}var E=ns.getElementsByTagName('span');if(ns.hasAttribute('style')&&ns.getAttribute('style').match(/mso-list/)){C.push(ns);
ns=ns.nextSibling;G=true;if(E.length&&E[0].hasAttribute('style')){var F=this.styleToObject(E[0]);if(typeof(F['font-family'])!='undefined'&&!F['font-family'].match(/Symbol/)){D='ol';}}continue;}var E=ns.getElementsByTagName('span');if(!E.length){break;}var G=false;
for(var i=0;i<E.length;i++){if(E[i].hasAttribute('style')&&E[i].getAttribute('style').match(/mso-list/)){G=true;break;}}if(!G){break;}C.push(ns);ns=ns.nextSibling;}if(!C.length){ns.className="";return;}var ul=A.ownerDocument.createElement(D);A.insertBefore(ul,p);
var H=0;var I=[ul];var J=false;var K={};max_margins=-1;C.forEach(function(n,L){var M=n.getElementsByTagName('span');if(!M.length){A.removeChild(n);return;}var N=1;var O={};for(var i=0;i<M.length;i++){O=this.styleToObject(M[i]);if(typeof(O['mso-list'])=='undefined'){continue;
}if(D=='ol'){N=M[i].innerText.replace(/[^0-9]+]/g,'')*1;}M[i].parentNode.removeChild(M[i]);break;}O=this.styleToObject(n);if(typeof(O['mso-list'])=='undefined'){A.removeChild(n);return;}var P=O['margin-left'];if(typeof(K[P])=='undefined'){max_margins++;K[P]=max_margins;
-}nlvl=K[P];if(nlvl>H){var Q=B.createElement(D);if(!J){J=B.createElement('li');I[H].appendChild(J);}J.appendChild(Q);I[nlvl]=Q;}H=nlvl;if(!I[nlvl].hasAttribute("start")&&N>1){I[nlvl].setAttribute("start",N);}var R=I[nlvl].appendChild(B.createElement('li'));
+}nlvl=K[P];if(nlvl>H){var Q=B.createElement(D);if(!J){J=B.createElement('li');I[H].appendChild(J);}J.appendChild(Q);I[nlvl]=Q;}H=nlvl;if(!I[nlvl].hasAttribute("start")&&D=="ol"){I[nlvl].setAttribute("start",N);}var R=I[nlvl].appendChild(B.createElement('li'));
J=R;R.innerHTML=n.innerHTML;A.removeChild(n);},this);}});
// Roo/htmleditor/FilterStyleToTag.js
Roo.htmleditor.FilterStyleToTag=function(A){this.tags={B:['fontWeight','bold'],I:['fontStyle','italic'],SUP:['verticalAlign','super'],SUB:['verticalAlign','sub']};Roo.apply(this,A);this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterStyleToTag,Roo.htmleditor.Filter,{tag:true,tags:false,replaceTag:function(A){if(A.getAttribute("style")===null){return true;
}}},toggleSourceEdit:function(A){this.sourceEditMode=A===true;if(this.sourceEditMode){Roo.get(this.iframe).addClass(['x-hidden','hide','d-none']);}else{Roo.get(this.iframe).removeClass(['x-hidden','hide','d-none']);this.deferFocus();}},cleanHtml:function(A){A=String(A);
if(A.length>5){if(Roo.isSafari){A=A.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,'');}}if(A==' '){A='';}return A;},syncValue:function(){if(this.initialized){if(this.undoManager){this.undoManager.addEvent();}var bd=(this.doc.body||this.doc.documentElement);
var A=this.win.getSelection();var B=document.createElement('div');B.innerHTML=bd.innerHTML;var C=B.getElementsByClassName('gtx-trans-icon');if(C.length>0){var rm=C.item(0).parentNode;rm.parentNode.removeChild(rm);}if(this.enableBlocks){new Roo.htmleditor.FilterBlock({node:B}
-);}var D=new Roo.htmleditor.TidySerializer({inner:true});var E=D.serialize(B);if(Roo.isSafari){var bs=bd.getAttribute('style');var m=bs?bs.match(/text-align:(.*?);/i):false;if(m&&m[1]){E='<div style="'+m[0]+'">'+E+'</div>';}}E=this.cleanHtml(E);E=E.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,E)!==false){this.el.dom.value=E;
-this.owner.fireEvent('sync',this,E);}}},pushValue:function(){if(this.initialized){var v=this.el.dom.value.trim();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;
+);}var D=B.innerHTML;if(this.autoClean){new Roo.htmleditor.FilterAttributes({node:B,attrib_white:['href','src','name','align','colspan','rowspan','data-display','data-width','start','style','class','allowfullscreen','frameborder','width','height','alt'],attrib_clean:['href','src']}
+);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(){if(this.initialized){var v=this.el.dom.value.trim();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});}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);