Search code examples
jquerytextareajeditable

Jeditable inserts extra spaces around the text in text area


Jeditable is inserting extra spaces around the actual text in a text area for me when I click to edit some text. How do I trim this or actually fix this?


Solution

  • You can actually just pass a function to trim the string you are going to edit. Use this in your settings:

    data    : function(string) {return $.trim(string)},
    submit: "Save"