| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> |
| 5 |
<title>Editor Resize Table Column</title> |
| 6 |
<style type="text/css"> |
| 7 |
@import "../../../dojo/resources/dojo.css"; |
| 8 |
@import "../../../dijit/themes/claro/claro.css"; |
| 9 |
</style> |
| 10 |
|
| 11 |
<link href="../plugins/resources/editorPlugins.css" type="text/css" rel="stylesheet" /> |
| 12 |
|
| 13 |
<script type="text/javascript"> |
| 14 |
var djConfig = { |
| 15 |
isDebug: true, |
| 16 |
parseOnLoad: true, |
| 17 |
popup:true |
| 18 |
//forceFirebugLite:true |
| 19 |
}; |
| 20 |
</script> |
| 21 |
|
| 22 |
<script type="text/javascript" src="../../../dojo/dojo.js"></script> |
| 23 |
|
| 24 |
|
| 25 |
<script type="text/javascript" src="../../../dijit/tests/_testCommon.js"></script> |
| 26 |
|
| 27 |
<script> |
| 28 |
dojo.require("dojo.parser"); |
| 29 |
dojo.require("dijit.Editor"); |
| 30 |
dojo.require("dijit.form.Button"); |
| 31 |
dojo.require("dojox.editor.plugins.ResizeTableColumn"); |
| 32 |
dojo.require("dijit._editor.plugins.ViewSource"); |
| 33 |
dojo.addOnLoad(function(){ |
| 34 |
console.log(dojo.version.toString()); |
| 35 |
}); |
| 36 |
|
| 37 |
dojo.addOnLoad(function(){ |
| 38 |
var editor = dijit.byId("editor"); |
| 39 |
var button = dijit.byId("removeButton"); |
| 40 |
var c = dojo.connect(button, "onClick", function(){ |
| 41 |
dojo.disconnect(c); |
| 42 |
editor.close(); |
| 43 |
editor.destroy(); |
| 44 |
}); |
| 45 |
}); |
| 46 |
</script> |
| 47 |
<style> |
| 48 |
#main{ |
| 49 |
width:auto; |
| 50 |
margin:20px 100px; |
| 51 |
} |
| 52 |
</style> |
| 53 |
</head> |
| 54 |
<body class="claro"> |
| 55 |
<div id="main"> |
| 56 |
<div id="editor" dojoType="dijit.Editor" height="200px" plugins="[ |
| 57 |
'undo', 'redo', 'bold','italic','|', |
| 58 |
{name: 'dojox.editor.plugins.TablePlugins', command: 'resizeTableColumn'}, 'viewsource' |
| 59 |
]"> |
| 60 |
Dojo Rocks with a fox in socks. Red socks. In a box. |
| 61 |
<br/><br/> |
| 62 |
<table width="500" border="2" cellpadding="2" cellspacing="2" bordercolor="#00FFFF" bgcolor="#FF0000" id="myTable"> |
| 63 |
<tr> |
| 64 |
<td> </td> |
| 65 |
<td> </td> |
| 66 |
<td> </td> |
| 67 |
</tr> |
| 68 |
<tr> |
| 69 |
<td> </td> |
| 70 |
<td id="myCell"> </td> |
| 71 |
<td> </td> |
| 72 |
</tr> |
| 73 |
<tr> |
| 74 |
<td> </td> |
| 75 |
<td> </td> |
| 76 |
<td bgcolor="#00FFFF">Text</td> |
| 77 |
</tr> |
| 78 |
</table> |
| 79 |
</div> |
| 80 |
</div> |
| 81 |
<button id="removeButton" dojoType="dijit.form.Button">Remove Editor</button> |
| 82 |
</body> |
| 83 |
</html> |