From 6eadcb473c5e0a28f26efe81271b1354567bf409 Mon Sep 17 00:00:00 2001 From: ernesto-r Date: Fri, 24 Mar 2017 11:41:30 +0100 Subject: [PATCH] textarea fix Had the same Problem as @lucadealfaro, but @anilmaurya's fix didn't help. This works for me. --- jquery.editable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.editable.js b/jquery.editable.js index b58244d..5e581f2 100644 --- a/jquery.editable.js +++ b/jquery.editable.js @@ -35,7 +35,7 @@ if(trigger !== target) trigger.hide(); var old_value = ( type === 'textarea' ? - target.text().replace(//gm, '\n').replace(/>/gm, '>').replace(/</gm, '<') : + target.html().replace(/[\r\n]/gm, '').replace(//gm, '\n').replace(/>/gm, '>').replace(/</gm, '<') : target.text() ).replace(/^\s+/,'').replace(/\s+$/,'');