Search code examples
javascriptx-editable

x-editable textarea, html values disappear on edit


when using x-editable with a textarea that has html tags, they disappear when I click edit. If I add them again, they remain there when I click again after a successful update.

Any ideas?


Solution

  • Here's one way to fix things

    via HTML

    <a ... data-type="textarea" data-value="<html-text>">
    

    or via Javascript

    $().editable({"value":"<html-text>"})
    

    Replace <html-text> with the html text either in your template or in your javascript, depending on what you need.