Hi everybody,
I'm trying tu use Jeditable to edit inline some content put in textareas. So, I call the script files:
<script src="js/jquery.jeditable.js"></script>
<script src="js/jquery.jeditable.autogrow.js"></script>
<script src="js/jquery.autogrow.js"></script>
Then I have a function that sould send data to the server (I kept the example URL). This fonction creates a textarea and permits the edition:
$(".autogrow").editable("http://www.appelsiini.net/projects/jeditable/php/save.php", {
indicator : "<img src='img/indicator.gif'>",
type : "autogrow",
submit : 'OK',
cancel : 'cancel',
tooltip : "Click to edit...",
onblur : "ignore",
event : "dblclick",
autogrow : {
lineHeight : 16,
minHeight : 32
}
});
Then, I have the data to edit thant contains html tags because I have to store them:
$data = '<div style="color:red">Foo Bar</div>';
echo '<div class="autogrow">'.htmlentities($data).'</div>';
The "echo" displays the "$data" content perfectly with the tags, but when I want to edit inline the DIV, a textarea is created and the following data is displayed in that textarea:
<div style="color:red">Foo Bar<div>
instead of:
<div style="color:red">Foo Bar</div>
How can I display the right characters?
Thank you very much,
regards