I'm using the wysihat-engine on my jsp. It works well, but when I tried to add a preview feature that is suppose to read from the on-fly created iFrame and put it's value inside the hidden preview div, it couldn't read the iframe's included html. Any work-around for this? Thanks! In this example i want to return the value inside the body using jquery
the following iFrame is not written inside my jsp, but it is attached to a div by WYSihat.js file:
<iframe id="iframeId" class="abc">
<html>
<head></head>
<body>
<br>
some text here
</br>
</body>
</html>
</iframe>
How to return "some text here" and pass it to the following function: Hint, this iFrame has been created on fly by the WYSiHat.js file, as it is not hard written inside my jsp page
function preview() {
alert("hi"+$('iframe.editor').contents().find('body').text());
}