how to enable iFrame designMode in a local webpage without using the localhost server?
- by vjk2005
The code...
<html>
<body>
<iframe id="editableFrame"></iframe>
<script type="text/javascript">
editableFrame.document.designMode="on";
</script>
</body>
</html>
gets the iFrame editable only when run off a server(http://...)(online or from localhost). How do I get this working by simply opening it up as a local html file(file:///...) in the browser?
Some browser specific notes:
1. Firefox needs slightly different code to enable designMode but the problem still remains.
2. IE8 gets me the behavior I want with this code, but it pops up a warning about enabling ActiveX controls which the user must accept before getting the iFrame editable.
3. Opera 10.5 is the only browser that has the behavior I want... iFrames are editable without needing to run the code off a server.