module('plugins.preview'); test('插入代码后预览',function(){ // var editor = te.obj[0]; // var body = editor.body; // var html = '
1. function addSpace(linenum){'; // editor.setContent(html); // editor.execCommand('preview'); // ua.checkSameHtml(body.innerHTML,html,'预览不会对页面代码产生影响'); equal('',''); }); //test('设置内容后后预览',function(){ // if(ua.browser.gecko)return;//ff总不停打开窗口,实际操作没问题 // var editor = te.obj[0]; // var body = editor.body; // var html = '
2. if(linenum<10){
3. return " ";
4. }else if(linenum>=10 && linenum<100){
5. return " ";
6. }else if(linenum>=100 && linenum<1000){
7. return "";
8. }
9. }
你好,我亲爱的朋友
'; // var html_ie10 ="你好,我亲爱的朋友
"; // editor.setContent(html); // editor.focus(); // editor.execCommand('preview'); // ua.checkSameHtml(body.innerHTML,(ua.browser.ie>8)?html_ie10:html,'预览不会对页面代码产生影响'); //});