I have a div with a text and when I click on it, I load a tinymce editor. My Problem is, that when I change the text in the editor and submit it, the changes are gone.
I have a workaround witha script, that listens on editors keyups and copys the editor content to a hidden field, but this couldn´t be the best way. Especially I also have to listen to "paste", "changes in tiny-dialogs", etc...
Here ist my code
<script type="text/javascript">
$(document).ready(function() {
$(".TinyLoadOnClick").click(function() {
$("#TinyArea").show();
$(this).hide();
tinymce.init({
selector: "textarea",
plugins: ["advlist autolink lists link image charmap print preview anchor","searchreplace visualblocks code fullscreen","insertdatetime media table contextmenu paste"],
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
});
});
});
</script>
<form method="post" action="dump.php">
<div class="TinyLoadOnClick">
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt
</div>
<textarea id="TinyArea" style="display:none;" name="content">
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt
</textarea>
Here is the code in a tiny fiddle http://fiddle.tinymce.com/2ofaab/1
Can you help me?