Changeset 661
- Timestamp:
- 01/15/07 20:45:24 (5 years ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
XinhaCore.js (modified) (4 diffs)
-
examples/testbed.html (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/XinhaCore.js
r658 r661 2244 2244 html += "<base href=\"" + editor.config.baseHref + "\"/>\n"; 2245 2245 } 2246 html += "<style title=\"table borders\">"; 2247 html += ".htmtableborders, .htmtableborders td, .htmtableborders th {border : 1px dashed lightgrey ! important;} \n"; 2248 html += "</style>\n"; 2249 html += "<style type=\"text/css\">"; 2250 html += "html, body { border: 0px; } \n"; 2251 html += "body { background-color: #ffffff; } \n"; 2252 html += "span.macro, span.macro ul, span.macro div, span.macro p {background : #CCCCCC;}\n"; 2253 html += "</style>\n"; 2254 2246 2247 html += Xinha.addCoreCSS(); 2248 2255 2249 if ( editor.config.pageStyle ) 2256 2250 { … … 4275 4269 html = html.replace(/(<script[^>]*)(freezescript)/gi,"$1javascript"); 4276 4270 4271 // If in fullPage mode, strip the coreCSS 4272 if(this.config.fullPage) 4273 { 4274 html = Xinha.stripCoreCSS(html); 4275 } 4276 4277 4277 4278 return html; 4278 4279 }; … … 4304 4305 4305 4306 html = this.fixRelativeLinks(html); 4307 4308 // If in fullPage mode, add the coreCSS 4309 if(this.config.fullPage) 4310 { 4311 html = Xinha.addCoreCSS(html); 4312 } 4313 4306 4314 return html; 4307 4315 }; … … 5040 5048 }; 5041 5049 5050 Xinha.addCoreCSS = function(html) 5051 { 5052 var coreCSS = 5053 "<style title=\"Xinha Internal CSS\" type=\"text/css\">" 5054 + ".htmtableborders, .htmtableborders td, .htmtableborders th {border : 1px dashed lightgrey ! important;}\n" 5055 + "html, body { border: 0px; } \n" 5056 + "body { background-color: #ffffff; } \n" 5057 +"</style>\n"; 5058 5059 if(/<head>/i.test(html)) 5060 { 5061 return html.replace(/<head>/i, '<head>' + coreCSS); 5062 } 5063 5064 return coreCSS + html; 5065 } 5066 5067 Xinha.stripCoreCSS = function(html) 5068 { 5069 return html.replace(/<style[^>]+title="Xinha Internal CSS"(.|\n)*?<\/style>/i, ''); 5070 } 5042 5071 5043 5072 Xinha.addClasses = function(el, classes) -
trunk/examples/testbed.html
r659 r661 84 84 85 85 xinha_config = xinha_config ? xinha_config : new Xinha.Config(); 86 xinha_config.fullPage = true; 86 87 /* 87 88 // We can load an external stylesheet like this - NOTE : YOU MUST GIVE AN ABSOLUTE URL … … 144 145 <form action="javascript:var x = document.getElementById('editors_here');alert(x.myTextArea.value);" id="editors_here" onsubmit="alert(this.myTextArea.value);"> 145 146 <textarea id="myTextArea" name="myTextArea" style="width:100%;height:320px;"> 147 <html> 148 <head> 149 <title>Hello</title> 150 <style type="text/css"> 151 li { color:red; } 152 </style> 153 </head> 154 <body> 146 155 <p> 147 156 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. … … 162 171 <li> Nunc sit amet metus in tortor semper mattis. </li> 163 172 </ul> 173 </body> 174 </html> 164 175 </textarea> 165 176
