From a9a804887a91fa4d1f94e4b11579dc11272c0953 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 27 Sep 2013 14:29:34 +0000 Subject: [PATCH] better newline matching --- source/Ox.UI/js/Form/EditableContent.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/Ox.UI/js/Form/EditableContent.js b/source/Ox.UI/js/Form/EditableContent.js index 35d867bd..b9a31524 100644 --- a/source/Ox.UI/js/Form/EditableContent.js +++ b/source/Ox.UI/js/Form/EditableContent.js @@ -91,8 +91,7 @@ Ox.EditableContent = function(options, self) { if (e.originalEvent.clipboardData && e.originalEvent.clipboardData.getData) { Ox.print('TYPES', e.originalEvent.clipboardData.types); var value = e.originalEvent.clipboardData.getData('text/plain'); - value = Ox.encodeHTMLEntities(value).replace('\n', '
\n'); - Ox.print('VALUE', value); + value = Ox.encodeHTMLEntities(value).replace(/\n\n\n/g, '

\n'); document.execCommand('insertHTML', false, value); e.originalEvent.stopPropagation(); e.originalEvent.preventDefault();