1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/DTD/strict.dtd"> |
---|
2 | <html> |
---|
3 | <head> |
---|
4 | <title>FCKEditingArea Test</title> |
---|
5 | |
---|
6 | <script type="text/javascript"> |
---|
7 | |
---|
8 | window.onload = function() |
---|
9 | { |
---|
10 | var eTargetElement = document.getElementById( 'divTarget' ) ; |
---|
11 | var oTargetDocument = eTargetElement.ownerDocument ; |
---|
12 | |
---|
13 | |
---|
14 | // Create the editing area IFRAME. |
---|
15 | var oIFrame = oTargetDocument.createElement( 'iframe' ) ; |
---|
16 | oIFrame.src = 'javascript:void(0)' ; |
---|
17 | |
---|
18 | |
---|
19 | // Append the new IFRAME to the target. |
---|
20 | eTargetElement.appendChild( oIFrame ) ; |
---|
21 | |
---|
22 | |
---|
23 | var oDoc = oIFrame.contentWindow.document ; |
---|
24 | |
---|
25 | oDoc.open() ; |
---|
26 | oDoc.write( BuildHtml() ) ; |
---|
27 | oDoc.close() ; |
---|
28 | } |
---|
29 | |
---|
30 | |
---|
31 | function BuildHtml() |
---|
32 | { |
---|
33 | |
---|
34 | var sHtml = '' ; |
---|
35 | |
---|
36 | sHtml += '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/DTD/strict.dtd">' ; |
---|
37 | |
---|
38 | sHtml += '<html>' ; |
---|
39 | sHtml += '<head><title><\/title><meta content="text/html; charset=utf-8" http-equiv="Content-Type">' ; |
---|
40 | sHtml += '<\/head><body>' ; |
---|
41 | |
---|
42 | sHtml += '<div style="font-size:10px; font-family:Verdana"> Text outside the table'; |
---|
43 | sHtml += '<table border="1"><tr><td>Text in the table<\/td><\/tr><\/table>'; |
---|
44 | sHtml += 'If this is rendered in standards mode the text size inside the table will be the same as this one.'; |
---|
45 | sHtml += '<\/div>'; |
---|
46 | |
---|
47 | sHtml += '<\/body><\/html>' ; |
---|
48 | |
---|
49 | return sHtml ; |
---|
50 | } |
---|
51 | |
---|
52 | </script> |
---|
53 | |
---|
54 | </head> |
---|
55 | <body> |
---|
56 | <div id="divTarget"></div> |
---|
57 | </body> |
---|
58 | </html> |
---|