开发者

Formatting input text with a jeditable textarea

I have a textarea that is editable using jeditable (jquery), I need a way of the users input into formatted text; for example, if the user would like to enter the following:

This is a letter from God to Man.

Hi How's it going???

Currently this is returned as:

This is a letter from God to Man. Hi How\'s it going???

Some sort of string replace, i guess...

jeditable function:

  $(".editable_textarea").editable("<?php print $url ?>save.php?id=<?php print $_开发者_运维技巧SESSION['id'] ?>", {
      indicator : "<img src='../images/indicator.gif'>",
      type : 'textarea',
      submitdata: { _method: "put" },
      select : true,
      submit : 'OK',
      cancel : 'cancel',
      cssclass : "selected",
      height : '200px'
  });

Textarea:

<span class="editable_textarea" id="letter"><?php print file_get_contents($url . 'load.php?id=letter&sid='.$_SESSION['id'].'') ?></span>

Thanks and any help is welcome.

B.


This is a long dead question I guess, but:

<span class="editable_textarea" id="letter"><?php print stripslashes(file_get_contents($url . 'load.php?id=letter&sid='.$_SESSION['id'].'')) ?></span>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜